coupon.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view>
  3. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="卡券使用记录"></u-navbar>
  4. <!-- 卡券筛选 -->
  5. <view class="prize-state">
  6. <u-tabs @change="changeTab" :scrollable="false" :list="stateArr" lineWidth="40" lineHeight="1"
  7. lineColor="#D70909" :activeStyle="{
  8. color: '#D70909',
  9. transform: 'scale(1)'
  10. }" :inactiveStyle="{
  11. color: '#333',
  12. transform: 'scale(1)'
  13. }" itemStyle="padding-left: 25px; padding-right: 25px; height: 44px;">
  14. </u-tabs>
  15. </view>
  16. <!-- 已使用 -->
  17. <view class="prize-coupon">
  18. <view class="prize-coupon-list">
  19. <!-- <view class="flex prize-coupon-list-item">
  20. <image src="../../static/logo.png" mode=""></image>
  21. <view class="flex info">
  22. <view class="flex desc">
  23. <view class="title">200元代金券</view>
  24. <view class="txt">使用期限:2022.03.02-2022.04.01</view>
  25. <view class="txt">使用范围:星巴克xxx店</view>
  26. </view>
  27. <view class="flex btn">
  28. <view class="amt"><text>¥</text>100</view>
  29. </view>
  30. <view class="state">已使用</view>
  31. </view>
  32. </view> -->
  33. </view>
  34. </view>
  35. <view class="flex empty" v-if="!list.length">
  36. <u-empty text="数据为空" mode="order" />
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. stateArr: [{
  45. name: '已使用'
  46. }, {
  47. name: '已过期',
  48. }],
  49. state: 0,
  50. pageNum: 1,
  51. total: 0,
  52. list: [],
  53. };
  54. },
  55. methods: {
  56. changeTab(e) {
  57. if (e.index == 0) {
  58. this.state = 0
  59. } else if (e.index == 1) {
  60. this.state = 1
  61. }
  62. },
  63. changeChecked() {
  64. },
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .prize-state {
  70. position: fixed;
  71. background-color: #FFFFFF;
  72. width: 100%;
  73. padding-bottom: 16rpx;
  74. z-index: 10;
  75. }
  76. .prize-coupon {
  77. margin-top: 104rpx;
  78. padding: 40rpx 30rpx 100rpx;
  79. &-list {
  80. &-item {
  81. justify-content: space-between;
  82. background-color: #FFFFFF;
  83. padding: 40rpx 20rpx;
  84. border-radius: 10rpx;
  85. margin-bottom: 40rpx;
  86. image {
  87. width: 94rpx;
  88. height: 132rpx;
  89. }
  90. .info {
  91. position: relative;
  92. justify-content: space-between;
  93. flex: 1;
  94. }
  95. .desc {
  96. height: 132rpx;
  97. flex-direction: column;
  98. justify-content: space-between;
  99. align-items: flex-start;
  100. padding-left: 20rpx;
  101. }
  102. .txt {
  103. font-size: 24rpx;
  104. }
  105. .btn {
  106. flex-direction: column;
  107. }
  108. .amt {
  109. font-size: 48rpx;
  110. font-weight: bold;
  111. line-height: 72rpx;
  112. }
  113. text {
  114. font-size: 24rpx;
  115. }
  116. .state{
  117. position: absolute;
  118. right: 50rpx;
  119. transform: rotate(20deg);
  120. -webkit-transform:rotate(20deg);
  121. width: 150rpx;
  122. height: 150rpx;
  123. line-height: 150rpx;
  124. border: #E1E1E1 4px solid;
  125. border-radius: 50%;
  126. background-color: #f9f2ef;
  127. text-align: center;
  128. color: #000000;
  129. opacity: .5;
  130. }
  131. }
  132. &-item:last-child {
  133. margin-bottom: 0;
  134. }
  135. }
  136. }
  137. .empty{
  138. height: 60vh;
  139. }
  140. </style>