cm-activipopu.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template name="cm-price">
  2. <!--促销活动弹窗提示-->
  3. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  4. <view class="tui-popup-box clearfix">
  5. <template v-if="product.activeStatus == 1">
  6. <view class="tui-scrollview-box">
  7. <view class="ladder-main clearfix">
  8. <view class="ladder-item">
  9. <view class="ladder-item-td">购买数</view> <view class="ladder-item-td">价格</view>
  10. </view>
  11. <view class="ladder-item" v-for="(ladd, index) in product.ladderList" :key="index">
  12. <view class="ladder-item-td">{{ ladd.buyNum }}</view>
  13. <view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <view class="tui-right-flex tui-popup-btn">
  19. <view class="tui-flex-1"> <view class="tui-button" @click="hidePopup()">了解</view> </view>
  20. </view>
  21. </view>
  22. </tui-bottom-popup>
  23. </template>
  24. <script>
  25. import { mapGetters } from 'vuex'
  26. export default {
  27. name: 'cm-price',
  28. props: {
  29. product: {
  30. type: Object
  31. },
  32. popupShow: {
  33. type: Boolean,
  34. default: false
  35. }
  36. },
  37. filters: {
  38. NumFormat: function(text) {
  39. //处理金额
  40. return Number(text).toFixed(2)
  41. }
  42. },
  43. created() {
  44. console.log(this.product)
  45. },
  46. computed: {
  47. ...mapGetters(['hasLogin', 'isWxAuthorize', 'isIphoneX'])
  48. },
  49. methods: {
  50. hidePopup() {
  51. this.$parent.popupShow = false
  52. },
  53. goGoodActiveFn(id) {
  54. this.$parent.popupShow = false
  55. this.$api.navigateTo('/pages/goods/goods-active?id=' + id)
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .tui-flex-1 {
  62. flex: 1;
  63. }
  64. .tui-popup-box {
  65. position: relative;
  66. box-sizing: border-box;
  67. min-height: 220rpx;
  68. padding: 24rpx 24rpx 0 24rpx;
  69. z-index: 9999;
  70. }
  71. .tui-scrollview-box {
  72. width: 100%;
  73. height: auto;
  74. float: left;
  75. box-sizing: border-box;
  76. .ladder-main {
  77. width: 100%;
  78. border: 1px solid $color-system;
  79. border-radius: 10rpx;
  80. .ladder-item {
  81. width: 100%;
  82. height: 80rpx;
  83. float: left;
  84. border-bottom: 1px solid $color-system;
  85. &:nth-child(1) {
  86. .ladder-item-td {
  87. color: #333333;
  88. }
  89. }
  90. &:last-child {
  91. border-bottom: none;
  92. }
  93. .ladder-item-td {
  94. width: 50%;
  95. text-align: center;
  96. line-height: 80rpx;
  97. font-size: $font-size-24;
  98. color: $color-system;
  99. box-sizing: border-box;
  100. float: left;
  101. &:nth-child(1) {
  102. border-right: 1px solid $color-system;
  103. }
  104. }
  105. }
  106. }
  107. .box-title {
  108. font-size: $font-size-26;
  109. color: $text-color;
  110. text-align: left;
  111. line-height: 56rpx;
  112. .txt {
  113. color: $color-system;
  114. margin: 0 8rpx;
  115. }
  116. }
  117. .box-text {
  118. font-size: $font-size-26;
  119. color: $text-color;
  120. text-align: left;
  121. line-height: 56rpx;
  122. .txt {
  123. color: #ff2a2a;
  124. }
  125. }
  126. .box-product {
  127. width: 100%;
  128. height: auto;
  129. margin-top: 20rpx;
  130. .title {
  131. font-size: $font-size-24;
  132. color: $text-color;
  133. text-align: left;
  134. line-height: 54rpx;
  135. }
  136. .box-product-main {
  137. width: 100%;
  138. height: 136rpx;
  139. float: left;
  140. margin: 10rpx 0;
  141. .image {
  142. width: 134rpx;
  143. height: 134rpx;
  144. border: 1px solid #ebebeb;
  145. float: left;
  146. image {
  147. width: 100%;
  148. height: 100%;
  149. display: block;
  150. }
  151. }
  152. .info {
  153. width: 540rpx;
  154. height: 134rpx;
  155. float: left;
  156. margin-left: 16rpx;
  157. position: relative;
  158. .name {
  159. width: 100%;
  160. float: left;
  161. line-height: 40rpx;
  162. font-size: $font-size-28;
  163. color: $text-color;
  164. -o-text-overflow: ellipsis;
  165. text-overflow: ellipsis;
  166. display: -webkit-box;
  167. word-break: break-all;
  168. -webkit-box-orient: vertical;
  169. -webkit-line-clamp: 2;
  170. overflow: hidden;
  171. }
  172. .num {
  173. width: 100%;
  174. height: 44rpx;
  175. font-size: $font-size-24;
  176. color: $text-color;
  177. text-align: left;
  178. line-height: 44rpx;
  179. position: absolute;
  180. bottom: 0;
  181. left: 0;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. .tui-popup-btn {
  188. width: 100%;
  189. height: auto;
  190. float: left;
  191. margin-top: 24rpx;
  192. .tui-button {
  193. width: 100%;
  194. height: 88rpx;
  195. background: $btn-confirm;
  196. line-height: 88rpx;
  197. text-align: center;
  198. color: #ffffff;
  199. font-size: $font-size-28;
  200. border-radius: 44rpx;
  201. }
  202. }
  203. </style>