cm-coupon-tips.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template name="alert">
  2. <view class="coupon-content-model">
  3. <view class="coupon-alert-content">
  4. <view class="coupon">
  5. <view class="coupon-list">
  6. <view class="list-cell-tags"
  7. ><text>{{ coupon.couponType | TypeFormat }}</text></view
  8. >
  9. <view class="list-cell-le">
  10. <view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.couponAmount }} </view>
  11. <view class="coupon-minMoney">
  12. <text class="txt">满{{ coupon.touchPrice }}可用</text>
  13. </view>
  14. </view>
  15. <view class="list-cell-ri">
  16. <view class="list-cell-top">
  17. <text v-if="coupon.couponType == 0">
  18. {{
  19. coupon.productType && coupon.productType == 1
  20. ? '全商城商品通用'
  21. : '仅可购买指定商品'
  22. }}
  23. </text>
  24. <text v-if="coupon.couponType == 1">
  25. {{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
  26. </text>
  27. <text v-if="coupon.couponType == 3">仅限购买店铺【{{ coupon.shopName }}】的商品</text>
  28. <text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
  29. </view>
  30. <view class="list-cell-time">{{ coupon.startDate }} - {{ coupon.endDate }}</view>
  31. </view>
  32. </view>
  33. <view class="coupon-btn" @click.stop="handleClickCancel">立即收下</view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. name: 'alert',
  41. props: {
  42. coupon: {
  43. type: Object
  44. }
  45. },
  46. filters: {
  47. TypeFormat(value) {
  48. const map = {
  49. 0:'活动券',
  50. 1:'品类券',
  51. 2:'用户专享券',
  52. 3:'店铺券',
  53. 4:'新用户券',
  54. }
  55. }
  56. },
  57. data() {
  58. return {}
  59. },
  60. created() {},
  61. onLoad() {},
  62. methods: {},
  63. onShow() {}
  64. }
  65. </script>
  66. <style lang="scss">
  67. .coupon-content-model {
  68. width: 100%;
  69. height: 100%;
  70. background: rgba(0, 0, 0, 0.5);
  71. position: fixed;
  72. top: 0;
  73. left: 0;
  74. z-index: 8888;
  75. transition: all 0.4s;
  76. .coupon-alert-content {
  77. width: 600rpx;
  78. height: 612rpx;
  79. position: absolute;
  80. top: 0;
  81. left: 0;
  82. bottom: 0;
  83. right: 0;
  84. margin: auto;
  85. box-sizing: border-box;
  86. padding-top: 92rpx;
  87. .coupon {
  88. width: 600rpx;
  89. height: 522rpx;
  90. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
  91. background-size: cover;
  92. box-sizing: border-box;
  93. padding: 230rpx 40rpx 0 40rpx;
  94. .coupon-list {
  95. width: 100%;
  96. height: 147rpx;
  97. margin-bottom: 32rpx;
  98. box-sizing: border-box;
  99. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
  100. background-size: cover;
  101. position: relative;
  102. .list-cell-tags {
  103. display: inline-block;
  104. padding: 0 10rpx;
  105. height: 32rpx;
  106. line-height: 32rpx;
  107. background-color: #f94b4b;
  108. color: #ffffff;
  109. font-size: 18rpx;
  110. border-radius: 16rpx 0 16rpx 0;
  111. text-align: center;
  112. position: absolute;
  113. top: 0;
  114. left: 0;
  115. }
  116. .list-cell-le {
  117. width: 154rpx;
  118. height: 100%;
  119. box-sizing: border-box;
  120. padding: 30rpx 0;
  121. float: left;
  122. .coupon-maxMoney {
  123. width: 100%;
  124. height: 54rpx;
  125. line-height: 54rpx;
  126. font-size: 42rpx;
  127. color: #f94b4b;
  128. text-align: center;
  129. margin-top: 10rpx;
  130. .small {
  131. font-size: $font-size-20;
  132. }
  133. }
  134. .coupon-minMoney {
  135. width: 100%;
  136. height: 28rpx;
  137. float: left;
  138. box-sizing: border-box;
  139. padding-left: 24rpx;
  140. .txt {
  141. display: block;
  142. height: 28rpx;
  143. line-height: 28rpx;
  144. font-size: 16rpx;
  145. color: #f94b4b;
  146. text-align: center;
  147. padding: 0 5rpx;
  148. background-color: #fff1eb;
  149. border-radius: 4rpx;
  150. float: left;
  151. }
  152. }
  153. }
  154. .list-cell-ri {
  155. width: 366rpx;
  156. height: 100%;
  157. box-sizing: border-box;
  158. padding: 30rpx 20rpx;
  159. float: left;
  160. .list-cell-top {
  161. width: 100%;
  162. height: 64rpx;
  163. line-height: 64rpx;
  164. font-size: $font-size-26;
  165. color: #333333;
  166. float: left;
  167. text-overflow: ellipsis;
  168. display: -webkit-box;
  169. word-break: break-all;
  170. -webkit-box-orient: vertical;
  171. -webkit-line-clamp: 1;
  172. overflow: hidden;
  173. }
  174. .list-cell-time {
  175. width: 100%;
  176. height: 28rpx;
  177. line-height: 28rpx;
  178. text-align: left;
  179. font-size: $font-size-20;
  180. color: #999999;
  181. }
  182. }
  183. }
  184. .coupon-btn {
  185. width: 100%;
  186. height: 78rpx;
  187. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
  188. background-size: cover;
  189. line-height: 78rpx;
  190. text-align: center;
  191. color: #ffffff;
  192. font-size: $font-size-36;
  193. }
  194. }
  195. }
  196. }
  197. </style>