coupon.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class='container'>
  3. <view class='coupon-box'>
  4. <view class='coupon-item'>
  5. <view class='item-left'>
  6. <view class='left-price'>满500减100元</view>
  7. <view class='left-time'>2023-03-01~2024-05-30</view>
  8. </view>
  9. <view class='item-right'>
  10. <view class='rebates'>
  11. <span class='rebates-numb'>2</span>折
  12. </view>
  13. <view class='rebates-text'>折扣</view>
  14. <button class='btn' @click='handlerToUse'>去使用</button>
  15. <view class='circle-box'>
  16. <view class='circle' v-for="item of 6"></view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default{
  25. data(){
  26. return{
  27. }
  28. },
  29. methods:{
  30. handlerToUse(){
  31. uni.showToast({
  32. title:'使用',
  33. icon:"none"
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang='scss' scope>
  40. page{
  41. background-color:#F9F9F9;
  42. }
  43. .container{
  44. min-height:100vh;
  45. .coupon-box{
  46. padding:24rpx 32rpx;
  47. box-sizing: border-box;
  48. width: 100%;
  49. .coupon-item{
  50. width: 100%;
  51. height: 263rpx;
  52. background-color: #fff;
  53. border-radius: 16rpx;
  54. display: flex;
  55. justify-content: space-between;
  56. box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.08);
  57. .item-left{
  58. display: flex;
  59. flex-direction: column;
  60. justify-content: space-evenly;
  61. width: 64%;
  62. text-align: center;
  63. .left-price{
  64. color:#0C1223;
  65. font-size: 36rpx;
  66. font-weight: bold;
  67. }
  68. .left-time{
  69. color:#999999;
  70. font-size: 24rpx;
  71. }
  72. }
  73. .item-right{
  74. position: relative;
  75. width: 35.27%;
  76. height: 100%;
  77. background-color: #ED4444;
  78. border-radius: 0 16rpx 16rpx 0;
  79. text-align: center;
  80. color:#fff;
  81. display: flex;
  82. flex-direction: column;
  83. justify-content: space-evenly;
  84. .rebates{
  85. font-size: 32rpx;
  86. .rebates-numb{
  87. font-size: 68rpx;
  88. font-weight: bold;
  89. }
  90. }
  91. .rebates-text{
  92. font-size: 24rpx;
  93. }
  94. .btn{
  95. height:54rpx;
  96. border-radius:30rpx;
  97. background-color: #fff;
  98. text-align: center;
  99. line-height: 54rpx;
  100. font-weight: bold;
  101. color:#E2433F;
  102. font-size: 28rpx;
  103. }
  104. .circle-box{
  105. position: absolute;
  106. left: -7%;
  107. height: 263rpx;
  108. display: flex;
  109. flex-direction: column;
  110. justify-content: space-evenly;
  111. .circle{
  112. width: 30rpx;
  113. height: 30rpx;
  114. border-radius:50%;
  115. background-color: #fff;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. </style>