secondPrice.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template name="second-price">
  2. <!-- 商品详情价格判断 -->
  3. <view class="wrap-main">
  4. <template v-if="!hasLogin">
  5. <view class="p-login grade tui-skeleton-fillet">
  6. <view class="floor-item-btn" v-if="product.detailTalkFlag !=2">
  7. <view class="btn" @click.stop="loginClick">登录查看价格</view>
  8. </view>
  9. <template v-else>
  10. <text class="p-no">¥</text>
  11. <text class="txt big" >详聊</text>
  12. </template>
  13. </view>
  14. </template>
  15. <template v-else>
  16. <view class="wrap-main-item">
  17. <view class="p-price tui-skeleton-fillet">
  18. <text class="txt sm">¥</text>
  19. <text class="txt big" v-if="product.detailTalkFlag==2">详聊</text>
  20. <text class="txt big" v-else>{{product.price1Str}}</text>
  21. </view>
  22. </view>
  23. </template>
  24. </view>
  25. </template>
  26. <script>
  27. import { mapState,mapMutations } from 'vuex'
  28. export default{
  29. name:'second-price',
  30. props:{
  31. product:{
  32. type:Object,
  33. },
  34. },
  35. data() {
  36. return{
  37. }
  38. },
  39. filters: {
  40. NumFormat:function(text) {//处理金额
  41. return Number(text).toFixed(2);
  42. },
  43. },
  44. created() {
  45. console.log(this.product)
  46. },
  47. computed: {
  48. ...mapState(['hasLogin','isWxAuthorize'])
  49. },
  50. methods:{
  51. loginClick(){
  52. this.$api.navigateTo('/pages/login/login')
  53. },
  54. },
  55. }
  56. </script>
  57. <style lang="scss">
  58. </style>