index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view>
  3. <view class='coupon-window' :class='window==true?"on":""' :style="'background-image: url('+couponImage+')'">
  4. <view class='couponWinList'>
  5. <view class='item acea-row row-between-wrapper' v-for="(item,index) in couponList" :key="index">
  6. <view class='money font-color'>¥<text class='num'>{{item.coupon_price}}</text></view>
  7. <view class='text'>
  8. <view class='name'>购物满{{item.use_min_price}}减{{item.coupon_price}}</view>
  9. <view v-if="item.coupon_time">领取后{{item.coupon_time}}天内可用</view>
  10. <view v-else>{{item.start_time ? item.start_time+'-' : ''}}{{item.end_time === 0 ? '不限时': item.end_time}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. <view class='lid'>
  15. <navigator hover-class='none' url='/pages/users/user_get_coupon/index' class='bnt font-color'>立即领取</navigator>
  16. <view class='iconfont icon-guanbi3' @click="close"></view>
  17. </view>
  18. </view>
  19. <view class='mask' catchtouchmove="true" :hidden="window==false"></view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. window: {
  26. type: Boolean | String | Number,
  27. default: false,
  28. },
  29. couponList: {
  30. type: Array,
  31. default: function() {
  32. return []
  33. },
  34. },
  35. couponImage: {
  36. type: String,
  37. default: '',
  38. },
  39. },
  40. data() {
  41. return {
  42. };
  43. },
  44. methods: {
  45. close:function(){
  46. this.$emit('onColse');
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .coupon-window {
  53. background-repeat: no-repeat;
  54. background-size: 100% 100%;
  55. width: 630rpx;
  56. height: 649rpx;
  57. position: fixed;
  58. top: 20%;
  59. z-index: 99;
  60. left: 50%;
  61. margin-left: -305rpx;
  62. transform: translate3d(0, -200%, 0);
  63. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  64. }
  65. .coupon-window.on {
  66. transform: translate3d(0, 0, 0);
  67. }
  68. .coupon-window .couponWinList {
  69. width: 480rpx;
  70. margin: 157rpx 0 0 60rpx;
  71. height: 415rpx;
  72. overflow: auto;
  73. }
  74. .coupon-window .couponWinList .item {
  75. width: 100%;
  76. height: 120rpx;
  77. background-color: #fff;
  78. position: relative;
  79. margin-bottom: 17rpx;
  80. }
  81. .coupon-window .couponWinList .item::after {
  82. content: '';
  83. position: absolute;
  84. width: 18rpx;
  85. height: 18rpx;
  86. border-radius: 50%;
  87. background-color: #f2443a;
  88. left: 25.5%;
  89. bottom: 0;
  90. margin-bottom: -9rpx;
  91. }
  92. .coupon-window .couponWinList .item::before {
  93. content: '';
  94. position: absolute;
  95. width: 18rpx;
  96. height: 18rpx;
  97. border-radius: 50%;
  98. background-color: #f2443a;
  99. left: 25.5%;
  100. top: 0;
  101. margin-top: -9rpx;
  102. }
  103. .coupon-window .couponWinList .item .money {
  104. width: 130rpx;
  105. border-right: 1px dashed #ddd;
  106. height: 100%;
  107. text-align: center;
  108. line-height: 120rpx;
  109. font-size: 26rpx;
  110. font-weight: bold;
  111. }
  112. .coupon-window .couponWinList .item .money .num {
  113. font-size: 40rpx;
  114. }
  115. .coupon-window .couponWinList .item .text {
  116. width: 349rpx;
  117. font-size: 22rpx;
  118. color: #999;
  119. padding: 0 29rpx;
  120. box-sizing: border-box;
  121. }
  122. .coupon-window .couponWinList .item .text .name {
  123. font-size: 26rpx;
  124. color: #282828;
  125. font-weight: bold;
  126. margin-bottom: 9rpx;
  127. }
  128. .coupon-window .lid {
  129. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAj0AAADgCAMAAADfcCfrAAAA1VBMVEUAAADuOi7uOi77TUr6TUn7Tkr8Tkv6TEj7Tkr7Tkr7Tkr7Tkv7Tkr6TUn7Tkv7Tkr8Tkv7TUn7Tkr6TUj7Tkv8Tkv7Tkr7Tkr7TUn6TUj7Tkv7Tkr7Tkv7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51TNQTSprrasX4maaB5u3E/TM0kJq8rQLL6Se18qgCbW2UwzB5jslbxfle7edbjJzrOdKZdLEObWU6fkpJo/8pPVDLAq5nh0kR25qf/LFvEYel6AM6kZ2tNTqMsUoBDGOvS35Blsv3omRYOiKa0lamNDAVx9nbBn1fEgtzaCmiRyeskpby+pcV1EU3TBy4Zl4RXhWGMYpDyVzXcuy0jR1nFBuaBCU1ePSLLgeQD0wHuoBjqAeQD0wAuoBjqAeQD0wAuoBjqAeQD3wE8gv+M0uHRMxDARBADtMqeKxC/NHZQo71/wWEgaxZQ/2cMLcsGUP9hCwhyL2YA8BeyhiD/Zwwvxgyx7sIWAPRezBHgL2UMQe7CFgD0XswR4C9lDEHvbmD1v2YA8BeyhiD/YQsIci9mAPAXsoMi9s2YM9BOyhiD3YwwlzwZY92EPAHorYgz0E7KGIPdhDwB6KzANb9nzs0sEJAkAQBLBtSRQFQUHtvydbGPZz80hqCPYQsIci9mAPAXsoYg/2cMJ8Ycse7CFgD0XsYW/usGUP9hCwhyL2YA8BeyhiD/YQsIci9mAPJ8wHtuzBHgL2UMQe7OGEucKWPdhDwB6K2IM9BOyhiD3YQ8AeitiDPQTsoci8YMse7CFgD0XswR4C9lDEHuzhhLnAlj3YQ8AeitiDPQTsoYg92EPAHorYgz0E7KGIPdjDCfOALXuwh4A9FLEHewjYQxF7sIeAPRSxh715w5Y92EPAHorYgz0E7KGIPdjDCfODLXuwh4A9FLGHvbnBlj3YQ8AeitiDPQTsoYg92EPAHorYgz0E7KHIPOHffh3jAAREURR9RKJSiIaCQqP4Y6j//hdGxALMbzT3rOHmJS+KekA9+IN2B4JkDgTpcCDGNDsQc2hlfBBjizRlB8pVqZW0nfwulNrzE4+0ptMq4DvLdaNXu3VDDXyWxl63C8Kz+KuXmMKNAAAAAElFTkSuQmCC');
  130. background-repeat: no-repeat;
  131. background-size: 100% 100%;
  132. width: 573rpx;
  133. height: 224rpx;
  134. position: fixed;
  135. left: 50%;
  136. top: 20%;
  137. margin: 424rpx 0 0 -296rpx;
  138. }
  139. .coupon-window .lid .bnt {
  140. font-size: 29rpx;
  141. width: 440rpx;
  142. height: 80rpx;
  143. border-radius: 40rpx;
  144. background-color: #f9f1d3;
  145. text-align: center;
  146. line-height: 80rpx;
  147. font-weight: bold;
  148. margin: 98rpx auto 0 auto;
  149. }
  150. .coupon-window .lid .iconfont {
  151. color: #fff;
  152. font-size: 60rpx;
  153. text-align: center;
  154. margin-top: 87rpx;
  155. }
  156. </style>