index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='coupon-window' :class='window==true?"on":""'>
  4. <image class="co-bag" src="../../static/images/co-bag.png" mode=""></image>
  5. <view class='couponWinList'>
  6. <view class='item acea-row row-between-wrapper' v-for="(item,index) in couponList" :key="index">
  7. <view class='money font-color'>¥<text class='num'>{{item.coupon_price}}</text></view>
  8. <view class='text'>
  9. <view class='name'>购物满{{item.use_min_price}}减{{item.coupon_price}}</view>
  10. <view v-if="item.coupon_time">领取后{{item.coupon_time}}天内可用</view>
  11. <view v-else>
  12. {{item.start_time ? item.start_time+'-' : ''}}{{item.end_time === 0 ? '不限时': item.end_time}}
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class='lid'>
  18. <navigator hover-class='none' url='/pages/users/user_get_coupon/index' class='bnt'>立即领取</navigator>
  19. <view class='iconfont icon-guanbi3' @click="close"></view>
  20. </view>
  21. </view>
  22. <view class='mask' catchtouchmove="true" :hidden="window==false"></view>
  23. </view>
  24. </template>
  25. <script>
  26. import colors from "@/mixins/color";
  27. export default {
  28. props: {
  29. window: {
  30. type: Boolean | String | Number,
  31. default: false,
  32. },
  33. couponList: {
  34. type: Array,
  35. default: function() {
  36. return []
  37. },
  38. },
  39. couponImage: {
  40. type: String,
  41. default: '',
  42. },
  43. },
  44. mixins: [colors],
  45. data() {
  46. return {
  47. };
  48. },
  49. methods: {
  50. close: function() {
  51. this.$emit('onColse');
  52. }
  53. }
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .mask {
  58. z-index: 9999;
  59. }
  60. .coupon-window {
  61. width: 572rpx;
  62. height: 760rpx;
  63. position: fixed;
  64. top: 20%;
  65. z-index: 10000;
  66. left: 50%;
  67. margin-left: -286rpx;
  68. transform: translate3d(0, -200%, 0);
  69. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  70. border-radius: 30rpx 30rpx 0 0;
  71. overflow-x: hidden;
  72. }
  73. .co-bag {
  74. width: 100%;
  75. height: 250rpx;
  76. z-index: 33333;
  77. top: -40rpx;
  78. position: absolute;
  79. }
  80. .coupon-window:after {
  81. width: 900rpx;
  82. height: 650rpx;
  83. position: absolute;
  84. top: 0%;
  85. left: 50%;
  86. z-index: 11111;
  87. margin-left: -450rpx;
  88. content: '';
  89. border-radius: 50% 50% 0 0;
  90. background: var(--view-theme);
  91. }
  92. .coupon-window.on {
  93. transform: translate3d(0, 0, 0);
  94. }
  95. .coupon-window .couponWinList {
  96. width: 480rpx;
  97. margin: 157rpx 0 0 50rpx;
  98. height: 340rpx;
  99. overflow-y: scroll;
  100. }
  101. .coupon-window .couponWinList .item {
  102. width: 100%;
  103. height: 120rpx;
  104. background-color: #fff;
  105. position: relative;
  106. margin-bottom: 17rpx;
  107. position: relative;
  108. z-index: 99999;
  109. }
  110. .coupon-window .couponWinList .item .left {
  111. border-right: 1px dashed #ccc;
  112. }
  113. .coupon-window .couponWinList .label {
  114. width: 28rpx;
  115. height: 64rpx;
  116. display: block;
  117. position: absolute;
  118. top: 0;
  119. right: 12rpx;
  120. }
  121. .coupon-window .couponWinList .item::after {
  122. content: '';
  123. position: absolute;
  124. width: 18rpx;
  125. height: 18rpx;
  126. border-radius: 50%;
  127. background-color: var(--view-theme);
  128. left: 25.5%;
  129. bottom: 0;
  130. margin-bottom: -9rpx;
  131. }
  132. .coupon-window .couponWinList .item::before {
  133. content: '';
  134. position: absolute;
  135. width: 18rpx;
  136. height: 18rpx;
  137. border-radius: 50%;
  138. background-color: var(--view-theme);
  139. left: 25.5%;
  140. top: 0;
  141. margin-top: -9rpx;
  142. }
  143. .coupon-window .couponWinList .item .money {
  144. width: 130rpx;
  145. text-align: center;
  146. font-size: 26rpx;
  147. font-weight: bold;
  148. }
  149. .coupon-window .couponWinList .item .min_money {
  150. color: #ccc;
  151. font-size: 18rpx;
  152. text-align: center;
  153. }
  154. .coupon-window .couponWinList .item .money .num {
  155. font-size: 40rpx;
  156. }
  157. .coupon-window .couponWinList .item .text {
  158. width: 349rpx;
  159. font-size: 22rpx;
  160. color: #ccc;
  161. padding: 0 29rpx;
  162. box-sizing: border-box;
  163. }
  164. .coupon-window .couponWinList .item .text .image {
  165. width: 32rpx;
  166. height: 32rpx;
  167. display: inline-block;
  168. vertical-align: bottom;
  169. margin-right: 10rpx;
  170. }
  171. .coupon-window .couponWinList .item .text .name {
  172. font-size: 26rpx;
  173. color: var(--view-priceColor);
  174. font-weight: bold;
  175. margin-bottom: 9rpx;
  176. width: 250rpx;
  177. }
  178. .coupon-window .lid {
  179. background: rgba(255, 255, 255, 0.2);
  180. width: 582rpx;
  181. height: 224rpx;
  182. position: fixed;
  183. z-index: 22222;
  184. left: 50%;
  185. top: 0%;
  186. margin: 424rpx 0 0 -296rpx;
  187. }
  188. .coupon-window .lid:after {
  189. width: 920rpx;
  190. height: 280rpx;
  191. position: absolute;
  192. top: -100%;
  193. left: 50%;
  194. z-index: 22222;
  195. margin-left: -460rpx;
  196. content: '';
  197. border-radius: 0 0 50% 50%;
  198. background: var(--view-theme);
  199. }
  200. .coupon-window .lid .bnt {
  201. font-size: 29rpx;
  202. width: 440rpx;
  203. height: 80rpx;
  204. border-radius: 40rpx;
  205. background: linear-gradient(90deg, #FFCA52 0%, #FE960F 100%);
  206. text-align: center;
  207. line-height: 80rpx;
  208. font-weight: bold;
  209. margin: 98rpx auto 0 auto;
  210. color: #fff;
  211. }
  212. .coupon-window .lid .iconfont {
  213. color: #fff;
  214. font-size: 60rpx;
  215. text-align: center;
  216. margin-top: 87rpx;
  217. }
  218. </style>