cm-price.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template name="cm-price">
  2. <!-- 商品详情价格判断 -->
  3. <view class="wrap-main">
  4. <view class="" v-if="userIdentity == 1">
  5. <view class="wrap-main-price">
  6. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  7. <view class="p-active" v-if="product.actStatus == 1">
  8. <image class="icon-active" :src="iconActive" mode="" ></image>
  9. </view>
  10. <view class="p-price tui-skeleton-fillet">
  11. <text class="txt sm">¥</text>
  12. <text class="txt big">{{retailPrice}}</text>
  13. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  14. </view>
  15. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  16. </view>
  17. <view class="wrap-ladder" v-else>
  18. <view class="ladder-main tui-skeleton-fillet">
  19. <view class="ladder-left">
  20. <view class="ladder-b">起订量:</view>
  21. <view class="ladder-b">价格:</view>
  22. </view>
  23. <view class="ladder-right">
  24. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  25. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  26. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="" v-if="userIdentity == 4">
  34. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == '1'">
  35. <text>未公开价格</text>
  36. </view>
  37. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == '2'">
  38. <text class="wrap-main-text">价格仅会员可见</text>
  39. <text class="wrap-main-none" @click.stop="goUpgradeApply">去升级会员查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
  40. </view>
  41. <view class="wrap-main-price" v-if="product.price1TextFlag == '0'">
  42. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  43. <view class="p-active" v-if="product.actStatus == 1">
  44. <image class="icon-active" :src="iconActive" mode="" ></image>
  45. </view>
  46. <view class="p-price tui-skeleton-fillet">
  47. <text class="txt sm">¥</text>
  48. <text class="txt big">{{retailPrice}}</text>
  49. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  50. </view>
  51. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  52. </view>
  53. <view class="wrap-ladder" v-else>
  54. <view class="ladder-main tui-skeleton-fillet">
  55. <view class="ladder-left">
  56. <view class="ladder-b">起订量:</view>
  57. <view class="ladder-b">价格:</view>
  58. </view>
  59. <view class="ladder-right">
  60. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  61. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  62. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="" v-if="userIdentity == 2">
  70. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
  71. <text>未公开价格</text>
  72. </view>
  73. <view class="wrap-main-price" v-else>
  74. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  75. <view class="p-active" v-if="product.actStatus == 1">
  76. <image class="icon-active" :src="iconActive" mode="" ></image>
  77. </view>
  78. <view class="p-price tui-skeleton-fillet">
  79. <text class="txt sm">¥</text>
  80. <text class="txt big">{{retailPrice}}</text>
  81. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  82. </view>
  83. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  84. </view>
  85. <view class="wrap-ladder" v-else>
  86. <view class="ladder-main tui-skeleton-fillet">
  87. <view class="ladder-left">
  88. <view class="ladder-b">起订量:</view>
  89. <view class="ladder-b">价格:</view>
  90. </view>
  91. <view class="ladder-right">
  92. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  93. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  94. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. import iconActive from '@/static/temp/icon-active.png'
  105. export default{
  106. name:'cm-price',
  107. props:{
  108. product:{
  109. type:Object,
  110. },
  111. userIdentity: {
  112. type: Number,
  113. default: 2
  114. },
  115. ladderPriceList:{
  116. type: Array,
  117. },
  118. retailPrice:{
  119. type:String,
  120. },
  121. smallMoney:{
  122. type:String,
  123. },
  124. minBuyNumber:{
  125. type: Number,
  126. default: 1
  127. }
  128. },
  129. data() {
  130. return{
  131. iconActive:iconActive
  132. }
  133. },
  134. created() {
  135. },
  136. methods:{
  137. goUpgradeApply(){
  138. this.$api.navigateTo('/pages/login/apply')
  139. }
  140. },
  141. }
  142. </script>
  143. <style lang="scss">
  144. </style>