usercoupon.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="coupon_layout">
  3. <view class="coupon_list">
  4. <view class="coupon_item">
  5. <view class="coupon_header">
  6. <text class="coupon_title">商家满减优惠券</text>
  7. <text class="coupon_price">¥10</text>
  8. </view>
  9. <view class="coupon_body">
  10. <text class="coupon_valid_date">有效期至2024.10.25 23:56</text>
  11. <text class="coupon_remaining">满59可用</text>
  12. </view>
  13. <view class="coupon_footer">
  14. <text class="coupon_rule">使用规则:必须在本商城使用</text>
  15. <view class="coupon_use" @click="useCoupon()">
  16. 去使用
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="to_bottom" v-if="isLast"> -----到底啦-----</view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. }
  29. },
  30. methods: {
  31. useCoupon(){
  32. uni.navigateTo({
  33. url:"/pagesA/coupon/couponproductlist"
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="less">
  40. .coupon_layout{
  41. width: 690rpx;
  42. margin: 30rpx auto;
  43. .coupon_list {
  44. width: 690rpx;
  45. display: flex;
  46. flex-direction: column;
  47. margin: 30rpx auto;
  48. gap: 20rpx;
  49. .coupon_item {
  50. display: flex;
  51. flex-direction: column;
  52. background: linear-gradient(to right,#ec3c35, #e8610e,#a51cd7);
  53. color: white;
  54. padding: 20rpx;
  55. border-radius: 10rpx;
  56. .coupon_header {
  57. display: flex;
  58. justify-content: space-between;
  59. .coupon_title {
  60. font-size: 32rpx;
  61. }
  62. .coupon_price {
  63. font-size: 40rpx;
  64. }
  65. }
  66. .coupon_body {
  67. display: flex;
  68. justify-content: space-between;
  69. margin-top: 10rpx;
  70. .coupon_valid_date {
  71. font-size: 24rpx;
  72. }
  73. .coupon_remaining {
  74. font-size: 32rpx;
  75. }
  76. }
  77. .coupon_footer {
  78. display: flex;
  79. justify-content: space-between;
  80. margin-top: 10rpx;
  81. .coupon_rule {
  82. font-size: 24rpx;
  83. }
  84. .coupon_use{
  85. width: 120rpx;
  86. color: #000000;
  87. text-align: center;
  88. font-size: 24rpx;
  89. background-color: #FFFFFF;
  90. border-radius: 20rpx;
  91. padding: 6rpx;
  92. }
  93. }
  94. }
  95. }
  96. }
  97. </style>