secondPrice.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template name="cm-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:'cm-price',
  30. props:{
  31. product:{
  32. type:Object,
  33. },
  34. userIdentity: {
  35. type: Number,
  36. default: 2
  37. },
  38. ladderPriceList:{
  39. type: Array,
  40. },
  41. promotions:{
  42. type:Object,
  43. }
  44. },
  45. data() {
  46. return{
  47. popupShow:false,
  48. promotionsType:0,
  49. isIphoneX:this.$store.state.isIphoneX,
  50. }
  51. },
  52. filters: {
  53. NumFormat:function(text) {//处理金额
  54. return Number(text).toFixed(2);
  55. },
  56. },
  57. created() {
  58. },
  59. computed: {
  60. ...mapState(['hasLogin','isWxAuthorize'])
  61. },
  62. methods:{
  63. clickPopupShow(type){
  64. this.popupShow = true
  65. this.promotionsType = type
  66. },
  67. hidePopup(){
  68. this.popupShow = false
  69. },
  70. PromotionsFormat(promo){//促销活动类型数据处理
  71. if(promo!=null){
  72. if(promo.type == 1 && promo.mode == 1){
  73. return true
  74. }else{
  75. return false
  76. }
  77. }
  78. return false
  79. },
  80. goUpgradeApply(){
  81. this.$api.navigateTo('/pages/login/apply')
  82. },
  83. loginClick(){
  84. this.$api.navigateTo('/pages/login/login')
  85. },
  86. goGoodActiveFn(id){
  87. this.$parent.popupShow = false
  88. this.$api.navigateTo('/pages/goods/goods-active?id='+id)
  89. }
  90. },
  91. }
  92. </script>
  93. <style lang="scss">
  94. </style>