cm-price.vue 5.3 KB

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