cm-activipopu.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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 | formatPrice }}</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. created() {
  38. console.log(this.product)
  39. },
  40. computed: {
  41. ...mapGetters(['hasLogin', 'isWxAuthorize', 'isIphoneX'])
  42. },
  43. methods: {
  44. hidePopup() {
  45. this.$parent.popupShow = false
  46. },
  47. goGoodActiveFn(id) {
  48. this.$parent.popupShow = false
  49. this.$api.navigateTo('/pages/goods/goods-active?id=' + id)
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .tui-flex-1 {
  56. flex: 1;
  57. }
  58. .tui-popup-box {
  59. position: relative;
  60. box-sizing: border-box;
  61. min-height: 220rpx;
  62. padding: 24rpx 24rpx 0 24rpx;
  63. z-index: 9999;
  64. }
  65. .tui-scrollview-box {
  66. width: 100%;
  67. height: auto;
  68. float: left;
  69. box-sizing: border-box;
  70. .ladder-main {
  71. width: 100%;
  72. border: 1px solid $color-system;
  73. border-radius: 10rpx;
  74. .ladder-item {
  75. width: 100%;
  76. height: 80rpx;
  77. float: left;
  78. border-bottom: 1px solid $color-system;
  79. &:nth-child(1) {
  80. .ladder-item-td {
  81. color: #333333;
  82. }
  83. }
  84. &:last-child {
  85. border-bottom: none;
  86. }
  87. .ladder-item-td {
  88. width: 50%;
  89. text-align: center;
  90. line-height: 80rpx;
  91. font-size: $font-size-24;
  92. color: $color-system;
  93. box-sizing: border-box;
  94. float: left;
  95. &:nth-child(1) {
  96. border-right: 1px solid $color-system;
  97. }
  98. }
  99. }
  100. }
  101. .box-title {
  102. font-size: $font-size-26;
  103. color: $text-color;
  104. text-align: left;
  105. line-height: 56rpx;
  106. .txt {
  107. color: $color-system;
  108. margin: 0 8rpx;
  109. }
  110. }
  111. .box-text {
  112. font-size: $font-size-26;
  113. color: $text-color;
  114. text-align: left;
  115. line-height: 56rpx;
  116. .txt {
  117. color: #ff457b;
  118. }
  119. }
  120. .box-product {
  121. width: 100%;
  122. height: auto;
  123. margin-top: 20rpx;
  124. .title {
  125. font-size: $font-size-24;
  126. color: $text-color;
  127. text-align: left;
  128. line-height: 54rpx;
  129. }
  130. .box-product-main {
  131. width: 100%;
  132. height: 136rpx;
  133. float: left;
  134. margin: 10rpx 0;
  135. .image {
  136. width: 134rpx;
  137. height: 134rpx;
  138. border: 1px solid #ebebeb;
  139. float: left;
  140. image {
  141. width: 100%;
  142. height: 100%;
  143. display: block;
  144. }
  145. }
  146. .info {
  147. width: 540rpx;
  148. height: 134rpx;
  149. float: left;
  150. margin-left: 16rpx;
  151. position: relative;
  152. .name {
  153. width: 100%;
  154. float: left;
  155. line-height: 40rpx;
  156. font-size: $font-size-28;
  157. color: $text-color;
  158. -o-text-overflow: ellipsis;
  159. text-overflow: ellipsis;
  160. display: -webkit-box;
  161. word-break: break-all;
  162. -webkit-box-orient: vertical;
  163. -webkit-line-clamp: 2;
  164. overflow: hidden;
  165. }
  166. .num {
  167. width: 100%;
  168. height: 44rpx;
  169. font-size: $font-size-24;
  170. color: $text-color;
  171. text-align: left;
  172. line-height: 44rpx;
  173. position: absolute;
  174. bottom: 0;
  175. left: 0;
  176. }
  177. }
  178. }
  179. }
  180. }
  181. .tui-popup-btn {
  182. width: 100%;
  183. height: auto;
  184. float: left;
  185. margin-top: 24rpx;
  186. .tui-button {
  187. width: 100%;
  188. height: 88rpx;
  189. background: $btn-confirm;
  190. line-height: 88rpx;
  191. text-align: center;
  192. color: #ffffff;
  193. font-size: $font-size-28;
  194. border-radius: 44rpx;
  195. }
  196. }
  197. </style>