couponCenter.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="page-wrap">
  3. <view class="coupon-panel">
  4. <view class="item">
  5. <view class="name">
  6. <view class="price">38</view>
  7. <view class="text">三八女神节特惠券</view>
  8. </view>
  9. <view class="desc time">有效日期:至 2023-12-31</view>
  10. <view class="desc">所有产品品类通用</view>
  11. <view class="desc">满100元可用</view>
  12. <view class="side">
  13. <text class="number">仅剩\n17张</text>
  14. <button class="btn">可领2张</button>
  15. </view>
  16. </view>
  17. <view class="item disabled">
  18. <view class="name">
  19. <view class="price">38</view>
  20. <view class="text">三八女神节特惠券</view>
  21. </view>
  22. <view class="desc time">有效日期:至 2023-12-31</view>
  23. <view class="desc">所有产品品类通用</view>
  24. <view class="desc">满100元可用</view>
  25. <view class="side">
  26. <view class="over">已领完</view>
  27. <text>持续发放中\n下次再领</text>
  28. </view>
  29. </view>
  30. <view class="item">
  31. <view class="name">
  32. <view class="price">38</view>
  33. <view class="text">三八女神节特惠券</view>
  34. </view>
  35. <view class="desc time">有效日期:至 2023-12-31</view>
  36. <view class="desc">所有产品品类通用</view>
  37. <view class="desc">满100元可用</view>
  38. <view class="side">
  39. <text class="number">仅剩\n17张</text>
  40. <button class="btn">可领2张</button>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {};
  50. },
  51. methods: {}
  52. };
  53. </script>
  54. <style lang="scss" scoped>
  55. .coupon-panel {
  56. padding: 13.74rpx 0;
  57. .item {
  58. width: 708.79rpx;
  59. height: 192.31rpx;
  60. border-radius: 8.24rpx;
  61. position: relative;
  62. overflow: hidden;
  63. padding: 27.47rpx 233.52rpx 27.47rpx 41.21rpx;
  64. box-sizing: border-box;
  65. margin: 13.74rpx auto;
  66. &:before {
  67. content: '';
  68. position: absolute;
  69. left: 0;
  70. top: 0;
  71. width: 100%;
  72. height: 100%;
  73. background: #fff;
  74. -webkit-mask-image: radial-gradient(circle at 13.74rpx 50%, transparent 13.74rpx, red 13.74rpx);
  75. -webkit-mask-position: -13.74rpx;
  76. z-index: -1;
  77. }
  78. &::after {
  79. content: '';
  80. position: absolute;
  81. right: -27.47rpx;
  82. top: 0;
  83. height: 100%;
  84. width: 239.01rpx;
  85. background: #00bdef;
  86. -webkit-mask-image: radial-gradient(circle at 5rpx, transparent 6rpx, red 6rpx);
  87. -webkit-mask-position: -6rpx;
  88. -webkit-mask-size: 100% 19rpx;
  89. z-index: -1;
  90. }
  91. &.disabled::after {
  92. background: #ccc;
  93. }
  94. }
  95. .name {
  96. font-size: 30.22rpx;
  97. height: 68.68rpx;
  98. display: flex;
  99. align-items: center;
  100. margin-top: -14rpx;
  101. .text {
  102. flex: 1;
  103. width: 0;
  104. white-space: nowrap;
  105. overflow: hidden;
  106. text-overflow: ellipsis;
  107. }
  108. .price {
  109. line-height: 1;
  110. margin: -14rpx 10rpx 0 0;
  111. }
  112. }
  113. .desc {
  114. font-size: 24.73rpx;
  115. color: #999;
  116. white-space: nowrap;
  117. overflow: hidden;
  118. text-overflow: ellipsis;
  119. line-height: 1.3;
  120. }
  121. .side {
  122. position: absolute;
  123. right: 0;
  124. top: 0;
  125. height: 100%;
  126. width: 211.54rpx;
  127. display: flex;
  128. flex-direction: column;
  129. align-items: center;
  130. font-size: 21.98rpx;
  131. color: #fff;
  132. padding-top: 27.47rpx;
  133. text-align: center;
  134. }
  135. .price {
  136. font-size: 68.68rpx;
  137. &:before {
  138. content: '¥';
  139. font-size: 38.46rpx;
  140. }
  141. }
  142. .number {
  143. font-size: 27.47rpx;
  144. line-height: 38.46rpx;
  145. }
  146. .over{
  147. font-size: 30.22rpx;
  148. margin: 13.74rpx 0 20.6rpx;
  149. }
  150. .time{
  151. color: #000;
  152. }
  153. .btn{
  154. width: 164.84rpx;
  155. height: 49.45rpx;
  156. background: #fff;
  157. border-radius: 8.24rpx;
  158. color: #00BDEF;
  159. font-size: 24.73rpx;
  160. line-height: 49.45rpx;
  161. padding: 0;
  162. margin-top: 13.74rpx;
  163. }
  164. }
  165. .foot-btn {
  166. position: fixed;
  167. left: 0;
  168. bottom: 0;
  169. width: 100%;
  170. height: 96.15rpx;
  171. background: #fff;
  172. font-size: 30.22rpx;
  173. color: #00bcd2;
  174. line-height: 96.15rpx;
  175. border: none;
  176. border-radius: 0;
  177. &:before {
  178. content: '';
  179. position: absolute;
  180. top: 0;
  181. left: 0;
  182. right: 0;
  183. height: 1rpx;
  184. background: #e0e0e0;
  185. }
  186. &::after {
  187. display: none;
  188. }
  189. }
  190. </style>