activipopu.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template name="cm-price">
  2. <!--促销活动弹窗提示-->
  3. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  4. <view class="tui-popup-box clearfix">
  5. <view class="tui-scrollview-box">
  6. <view class="box-text">
  7. <text>促销时间:</text> <text class="txt" v-if="Promotion.status == 1">不限时</text>
  8. <text class="txt" v-else>{{ Promotion.beginTime }} ~ {{ Promotion.endTime }}</text>
  9. </view>
  10. <view class="box-title" v-show="Promotion.mode == 2">
  11. <text>此商品参与{{ Promotion.name }},满</text>
  12. <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.touchPrice | NumFormat }}</text
  13. >减 <text class="txt">¥{{ Promotion == null ? '0.00' : Promotion.reducedPrice | NumFormat }}</text>
  14. </view>
  15. <view class="box-title" v-show="Promotion.mode == 3">
  16. <text>此商品参与{{ Promotion.name }},满</text> <text class="txt">¥{{ Promotion.touchPrice }}</text
  17. >赠送商品(赠品见订单详情)
  18. </view>
  19. </view>
  20. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  21. <view class="tui-flex-1"> <view class="tui-button" @click="hidePopup()">了解</view> </view>
  22. </view>
  23. </view>
  24. </tui-bottom-popup>
  25. </template>
  26. <script>
  27. import { mapGetters } from 'vuex'
  28. export default {
  29. name: 'cm-price',
  30. props: {
  31. Promotion: {
  32. type: Object
  33. },
  34. popupShow: {
  35. type: Boolean,
  36. default: false
  37. }
  38. },
  39. filters: {
  40. NumFormat: function(text) {
  41. //处理金额
  42. return Number(text).toFixed(2)
  43. }
  44. },
  45. created() {},
  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. }
  70. .tui-scrollview-box {
  71. width: 100%;
  72. height: auto;
  73. float: left;
  74. box-sizing: border-box;
  75. .ladder-main {
  76. width: 100%;
  77. height: 320rpx;
  78. border: 1px solid rgba(225, 86, 22, 0.3);
  79. border-radius: 10rpx;
  80. .ladder-item {
  81. width: 100%;
  82. height: 80rpx;
  83. float: left;
  84. border-bottom: 1px solid rgba(225, 86, 22, 0.3);
  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 rgba(225, 86, 22, 0.3);
  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: $color-system;
  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. .image {
  140. width: 134rpx;
  141. height: 134rpx;
  142. border: 1px solid #ebebeb;
  143. float: left;
  144. image {
  145. width: 100%;
  146. height: 100%;
  147. display: block;
  148. }
  149. }
  150. .info {
  151. width: 540rpx;
  152. height: 134rpx;
  153. float: left;
  154. margin-left: 16rpx;
  155. position: relative;
  156. .name {
  157. width: 100%;
  158. float: left;
  159. line-height: 40rpx;
  160. font-size: $font-size-28;
  161. color: $text-color;
  162. -o-text-overflow: ellipsis;
  163. text-overflow: ellipsis;
  164. display: -webkit-box;
  165. word-break: break-all;
  166. -webkit-box-orient: vertical;
  167. -webkit-line-clamp: 2;
  168. overflow: hidden;
  169. }
  170. .num {
  171. width: 100%;
  172. height: 44rpx;
  173. font-size: $font-size-24;
  174. color: $text-color;
  175. text-align: left;
  176. line-height: 44rpx;
  177. position: absolute;
  178. bottom: 0;
  179. left: 0;
  180. }
  181. }
  182. }
  183. }
  184. }
  185. .tui-popup-btn {
  186. width: 100%;
  187. height: auto;
  188. float: left;
  189. margin-top: 24rpx;
  190. .tui-button {
  191. width: 100%;
  192. height: 88rpx;
  193. background: $btn-confirm;
  194. line-height: 88rpx;
  195. text-align: center;
  196. color: #ffffff;
  197. font-size: $font-size-28;
  198. border-radius: 14rpx;
  199. }
  200. }
  201. </style>