You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.1 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view v-if="list.length > 0" class="list">
  3. <view class="item" v-for="(item,index) in list" @click="$emit('select', item)" :key="index">
  4. <view class="price">
  5. <view class="num">
  6. <view class="icon">
  7. </view>
  8. {{ item.money }}
  9. </view>
  10. <view class="tiao">
  11. {{ item.useMoney }}可用
  12. </view>
  13. </view>
  14. <view class="date">
  15. 有效期{{ item.endTime }}
  16. </view>
  17. <view @click.stop="$emit('select',item)" class="status">
  18. <!-- 使 -->
  19. 使
  20. </view>
  21. </view>
  22. </view>
  23. <van-empty v-else image="/static/empty/coupon.png" image-size="400rpx" description="暂无优惠券" />
  24. </template>
  25. <script>
  26. export default {
  27. props: ['list'],
  28. name: "couponList",
  29. data() {
  30. return {
  31. };
  32. },
  33. methods: {
  34. }
  35. }
  36. </script>
  37. <style scoped lang="scss">
  38. .list {
  39. .item {
  40. color: #EF8C94;
  41. position: relative;
  42. width: calc(100% - 40rpx);
  43. height: 220rpx;
  44. background: url(/static/coupon/c.png);
  45. background-size: 100% 100%;
  46. margin: 20rpx;
  47. box-sizing: border-box;
  48. padding: 30rpx;
  49. .status {
  50. position: absolute;
  51. right: 20rpx;
  52. top: 20rpx;
  53. height: calc(100% - 40rpx);
  54. width: 60rpx;
  55. writing-mode: vertical-rl;
  56. box-sizing: border-box;
  57. padding: 20rpx;
  58. background-color: #fff;
  59. border-radius: 60rpx;
  60. display: flex;
  61. justify-content: center;
  62. align-items: center;
  63. }
  64. .price {
  65. display: flex;
  66. align-items: center;
  67. .num {
  68. color: #EF8C94;
  69. font-weight: 900;
  70. font-size: 70rpx;
  71. display: flex;
  72. align-items: flex-end;
  73. .icon {
  74. color: #fff;
  75. background-color: #EF8C94;
  76. width: 30rpx;
  77. height: 30rpx;
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. font-size: 20rpx;
  82. border-radius: 14rpx;
  83. margin-bottom: 14rpx;
  84. margin-right: 10rpx;
  85. }
  86. }
  87. .tiao {
  88. padding: 10rpx 20rpx;
  89. background-color: #F1B8BD;
  90. color: #EF8C94;
  91. font-size: 22rpx;
  92. margin-left: 20rpx;
  93. border-radius: 10rpx;
  94. }
  95. }
  96. .date {}
  97. }
  98. }
  99. </style>