discount-list.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="item">
  3. <view class="header">
  4. <view class="header-left">
  5. <view class="header-left-title"> 手机优惠券 </view>
  6. <view class="header-left-time"> 有效期至2024.08.28 </view>
  7. </view>
  8. <view class="header-right-price"> ¥<text>10</text> </view>
  9. </view>
  10. <view class="footer">
  11. <view class="footer-left"> 适用于:双11商品 </view>
  12. <view v-if="index != 1" class="footer-right"> 去使用 </view>
  13. </view>
  14. </view>
  15. <view class="item">
  16. <view class="forbidden">
  17. <image src="/static/images/pure-list/employ.png" mode=""></image>
  18. </view>
  19. <view class="header">
  20. <view class="header-left">
  21. <view class="header-left-title"> 笔记本优惠券 </view>
  22. <view class="header-left-time"> 有效期至2024.08.28 </view>
  23. </view>
  24. <view class="header-right-price grayscale"> ¥<text>99</text> </view>
  25. </view>
  26. <view class="footer">
  27. <view class="footer-left"> 适用于:双11商品 </view>
  28. </view>
  29. </view>
  30. <view class="item">
  31. <view class="header">
  32. <view class="header-left">
  33. <view class="header-left-title"> 汽车优惠券 </view>
  34. <view class="header-left-time"> 有效期至2024.08.28 </view>
  35. </view>
  36. <view class="header-right-price"> ¥<text>9999</text> </view>
  37. </view>
  38. <view class="footer">
  39. <view class="footer-left"> 适用于:双11商品 </view>
  40. <view v-if="index != 1" class="footer-right"> 去使用 </view>
  41. </view>
  42. </view>
  43. <view class="item">
  44. <view class="forbidden">
  45. <image src="/static/images/pure-list/employ.png" mode=""></image>
  46. </view>
  47. <view class="header">
  48. <view class="header-left">
  49. <view class="header-left-title"> 笔记本优惠券 </view>
  50. <view class="header-left-time"> 有效期至2024.08.28 </view>
  51. </view>
  52. <view class="header-right-price grayscale"> ¥<text>99</text> </view>
  53. </view>
  54. <view class="footer">
  55. <view class="footer-left"> 适用于:双11商品 </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script setup>
  60. defineProps({
  61. list: {
  62. type: Array,
  63. default: [],
  64. },
  65. });
  66. </script>
  67. <style lang="scss" scoped>
  68. .forbidden {
  69. position: absolute;
  70. width: 100%;
  71. height: 100%;
  72. background: rgba(255, 255, 255, 0.5);
  73. left: 0;
  74. top: 0;
  75. image {
  76. position: absolute;
  77. right: 0;
  78. bottom: 0;
  79. width: 184rpx;
  80. height: 160rpx;
  81. }
  82. }
  83. .item {
  84. position: relative;
  85. width: 700rpx;
  86. margin: 20rpx auto 0;
  87. background: #ffffff;
  88. border-radius: 12rpx;
  89. box-shadow: 0px 3px 4px 0px rgba(24, 144, 255, 0.06);
  90. padding: 26rpx 40rpx 20rpx;
  91. box-sizing: border-box;
  92. .header {
  93. display: flex;
  94. justify-content: space-between;
  95. align-items: center;
  96. padding-bottom: 20rpx;
  97. border-bottom: 1rpx dashed #ededed;
  98. margin-bottom: 16rpx;
  99. .header-left {
  100. .header-left-title {
  101. font-size: 34rpx;
  102. font-weight: 500;
  103. text-align: left;
  104. color: #444444;
  105. margin-bottom: 8rpx;
  106. }
  107. .header-left-time {
  108. font-size: 28rpx;
  109. color: #777;
  110. }
  111. }
  112. .header-right-price {
  113. color: #ff3924;
  114. font-size: 42rpx;
  115. font-weight: bold;
  116. text {
  117. font-size: 72rpx;
  118. }
  119. }
  120. .grayscale {
  121. color: #ccc;
  122. }
  123. }
  124. .footer {
  125. height: 64rpx;
  126. display: flex;
  127. justify-content: space-between;
  128. align-items: center;
  129. .footer-left {
  130. font-size: 28rpx;
  131. color: #777777;
  132. }
  133. .footer-right {
  134. width: 144rpx;
  135. height: 64rpx;
  136. background: linear-gradient(112deg, #f7681d 9%, #f64226 84%);
  137. border-radius: 8rpx;
  138. box-shadow: 0px 5px 8px 0px rgba(236, 79, 40, 0.2);
  139. color: #fff;
  140. font-size: 28rpx;
  141. text-align: center;
  142. line-height: 64rpx;
  143. }
  144. }
  145. }
  146. </style>