spendAndSaveCoupon.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <script lang="ts" setup>
  2. </script>
  3. <template>
  4. <view class="spend-and-save-coupon">
  5. <view class="coupon-content">
  6. <view class="coupon-amount">
  7. <view class="coupon-amount-text">
  8. 50
  9. </view>
  10. <view class="coupon-amount-icon">
  11. ¥
  12. </view>
  13. </view>
  14. <view class="coupon-desc">
  15. 满699元可用
  16. </view>
  17. </view>
  18. <view class="coupon-btn">
  19. 去发券
  20. </view>
  21. </view>
  22. </template>
  23. <style lang="scss" scoped>
  24. .spend-and-save-coupon {
  25. width: 210rpx;
  26. height: 205rpx;
  27. background: url('@img/index/coupon1.png') no-repeat right top;
  28. background-size: cover;
  29. position: relative;
  30. .coupon-content {
  31. position: absolute;
  32. top: 35%;
  33. left: 51%;
  34. transform: translate(-50%, -50%);
  35. width: 162rpx;
  36. height: 158rpx;
  37. display: flex;
  38. flex-direction: column;
  39. justify-content: center;
  40. align-items: center;
  41. gap: 27rpx;
  42. .coupon-amount {
  43. position: relative;
  44. .coupon-amount-text {
  45. font-weight: 500;
  46. font-size: 66rpx;
  47. color: #ff4f3b;
  48. }
  49. .coupon-amount-icon {
  50. position: absolute;
  51. width: 24rpx;
  52. height: 24rpx;
  53. background-color: #ffffff;
  54. border-radius: 50%;
  55. bottom: 0;
  56. right: 0;
  57. transform: translate(55%, -20%);
  58. font-weight: 500;
  59. font-size: 20rpx;
  60. color: #ff1a00;
  61. display: flex;
  62. justify-content: center;
  63. align-items: center;
  64. }
  65. }
  66. .coupon-desc {
  67. font-weight: 400;
  68. font-size: 22rpx;
  69. color: #ff1a00;
  70. }
  71. }
  72. .coupon-btn {
  73. position: absolute;
  74. font-weight: 500;
  75. font-size: 22rpx;
  76. color: #f26e5f;
  77. bottom: 2rpx;
  78. left: 50%;
  79. transform: translate(-54%, -55%);
  80. }
  81. }
  82. </style>