activipopu.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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>
  8. <text class="txt" v-if="Promotion.status == 1">不限时</text>
  9. <text class="txt" v-else>{{ Promotion.beginTime }} ~ {{ Promotion.endTime }}</text>
  10. </view>
  11. <view class="box-title" v-show="Promotion.mode ==2">
  12. <text>此商品参与{{Promotion.name}},满</text>
  13. <text class="txt">¥{{Promotion == null ? '0.00' : Promotion.touchPrice | NumFormat}}</text>减
  14. <text class="txt">¥{{Promotion == null ? '0.00' : Promotion.reducedPrice | NumFormat}}</text>
  15. </view>
  16. <view class="box-title" v-show="Promotion.mode==3">
  17. <text>此商品参与{{Promotion.name}},满</text>
  18. <text class="txt">¥{{Promotion.touchPrice}}</text>赠送商品(赠品见订单详情)
  19. </view>
  20. </view>
  21. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
  22. <view class="tui-flex-1">
  23. <view class="tui-button" @click="hidePopup()">了解</view>
  24. </view>
  25. </view>
  26. </view>
  27. </tui-bottom-popup>
  28. </template>
  29. <script>
  30. import { mapState,mapMutations } from 'vuex'
  31. export default{
  32. name:'cm-price',
  33. props:{
  34. Promotion:{
  35. type:Object,
  36. },
  37. popupShow:{
  38. type:Boolean,
  39. default:false
  40. }
  41. },
  42. data() {
  43. return{
  44. isIphoneX:this.$store.state.isIphoneX,
  45. }
  46. },
  47. filters: {
  48. NumFormat:function(text) {//处理金额
  49. return Number(text).toFixed(2);
  50. },
  51. },
  52. created() {
  53. },
  54. computed: {
  55. ...mapState(['hasLogin','isWxAuthorize'])
  56. },
  57. methods:{
  58. hidePopup(){
  59. this.$parent.popupShow = false
  60. },
  61. goGoodActiveFn(id){
  62. this.$parent.popupShow = false
  63. this.$api.navigateTo('/pages/goods/goods-active?id='+id)
  64. }
  65. },
  66. }
  67. </script>
  68. <style lang="scss">
  69. .tui-flex-1 {
  70. flex: 1;
  71. }
  72. .tui-popup-box {
  73. position: relative;
  74. box-sizing: border-box;
  75. min-height: 220rpx;
  76. padding:24rpx 24rpx 0 24rpx;
  77. }
  78. .tui-scrollview-box{
  79. width: 100%;
  80. height: auto;
  81. float: left;
  82. box-sizing: border-box;
  83. .ladder-main{
  84. width: 100%;
  85. height: 320rpx;
  86. border: 1px solid rgba(225,86,22,0.3);
  87. border-radius: 10rpx;
  88. .ladder-item{
  89. width: 100%;
  90. height: 80rpx;
  91. float: left;
  92. border-bottom: 1px solid rgba(225,86,22,0.3);
  93. &:nth-child(1){
  94. .ladder-item-td{
  95. color: #333333;
  96. }
  97. }
  98. &:last-child{
  99. border-bottom: none;
  100. }
  101. .ladder-item-td{
  102. width:50%;
  103. text-align: center;
  104. line-height: 80rpx;
  105. font-size: $font-size-24;
  106. color: $color-system;
  107. box-sizing: border-box;
  108. float: left;
  109. &:nth-child(1){
  110. border-right: 1px solid rgba(225,86,22,0.3);
  111. }
  112. }
  113. }
  114. }
  115. .box-title{
  116. font-size: $font-size-26;
  117. color: $text-color;
  118. text-align: left;
  119. line-height: 56rpx;
  120. .txt{
  121. color: $color-system;
  122. margin: 0 8rpx;
  123. }
  124. }
  125. .box-text{
  126. font-size: $font-size-26;
  127. color: $text-color;
  128. text-align: left;
  129. line-height: 56rpx;
  130. .txt{
  131. color: $color-system;
  132. }
  133. }
  134. .box-product{
  135. width: 100%;
  136. height: auto;
  137. margin-top: 20rpx;
  138. .title{
  139. font-size: $font-size-24;
  140. color: $text-color;
  141. text-align: left;
  142. line-height: 54rpx;
  143. }
  144. .box-product-main{
  145. width: 100%;
  146. height: 136rpx;
  147. .image{
  148. width: 134rpx;
  149. height: 134rpx;
  150. border: 1px solid #EBEBEB;
  151. float: left;
  152. image{
  153. width: 100%;
  154. height: 100%;
  155. display: block;
  156. }
  157. }
  158. .info{
  159. width: 540rpx;
  160. height: 134rpx;
  161. float: left;
  162. margin-left: 16rpx;
  163. position: relative;
  164. .name{
  165. width: 100%;
  166. float: left;
  167. line-height: 40rpx;
  168. font-size: $font-size-28;
  169. color: $text-color;
  170. -o-text-overflow: ellipsis;
  171. text-overflow: ellipsis;
  172. display: -webkit-box;
  173. word-break: break-all;
  174. -webkit-box-orient: vertical;
  175. -webkit-line-clamp: 2;
  176. overflow: hidden;
  177. }
  178. .num{
  179. width: 100%;
  180. height: 44rpx;
  181. font-size: $font-size-24;
  182. color: $text-color;
  183. text-align: left;
  184. line-height: 44rpx;
  185. position: absolute;
  186. bottom: 0;
  187. left: 0;
  188. }
  189. }
  190. }
  191. }
  192. }
  193. .tui-popup-btn {
  194. width: 100%;
  195. height: auto;
  196. float: left;
  197. margin-top: 24rpx;
  198. .tui-button{
  199. width: 100%;
  200. height: 88rpx;
  201. background: $btn-confirm;
  202. line-height: 88rpx;
  203. text-align: center;
  204. color: #FFFFFF;
  205. font-size: $font-size-28;
  206. border-radius: 14rpx;
  207. }
  208. }
  209. </style>