index.vue 4.8 KB

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