secondPrice.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. },
  52. }
  53. </script>
  54. <style lang="scss">
  55. </style>