index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view>
  3. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券"></u-navbar>
  4. <view class="coupon-title">可用代金券:0</view>
  5. <view class="coupon-list">
  6. <!-- <view class="flex coupon-list-item">
  7. <view class="flex coupon-list-item-info">
  8. <image src="../../static/logo.png" mode=""></image>
  9. <view class="flex content">
  10. <view class="txt">xx盲票代金券</view>
  11. <view class="txt">使用期限:2022.03.02-2022.04.01</view>
  12. <view class="txt">适用范围:指定盲票</view>
  13. </view>
  14. <view class="money">
  15. <view class="">¥<text>10</text></view>
  16. </view>
  17. </view>
  18. <view class="checked">
  19. <view class="flex circle">
  20. <view class="action" v-if="actionIndex == 0"></view>
  21. </view>
  22. </view>
  23. </view> -->
  24. </view>
  25. <view class="flex empty" v-if="!list.length">
  26. <u-empty text="数据为空" mode="order" />
  27. </view>
  28. <view class="footer-fixed">
  29. <view class="flex btn">
  30. <button type="default" @click="exchange">确认</button>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. checked: false,
  40. actionIndex: 0,
  41. pageNum: 1,
  42. total: 0,
  43. list: [],
  44. };
  45. },
  46. methods:{
  47. changeChecked(e){
  48. console.log(e);
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .coupon {
  55. &-title {
  56. position: fixed;
  57. width: 100%;
  58. padding: 24rpx 32rpx;
  59. background-color: #FFFFFF;
  60. }
  61. &-list {
  62. margin-top: 100rpx;
  63. padding: 0 20rpx 100rpx;
  64. &-item {
  65. justify-content: space-between;
  66. padding: 20rpx;
  67. background-color: #FFFFFF;
  68. margin-bottom: 20rpx;
  69. &-info{
  70. flex: 1;
  71. justify-content: flex-start;
  72. image{
  73. width: 84rpx;
  74. height: 132rpx;
  75. margin-right: 20rpx;
  76. }
  77. .content{
  78. height: 132rpx;
  79. flex-direction: column;
  80. align-items: flex-start;
  81. justify-content: space-between;
  82. }
  83. .money{
  84. margin-left: 10rpx;
  85. font-weight: bold;
  86. text{
  87. font-size: 50rpx;
  88. }
  89. }
  90. }
  91. .circle{
  92. width: 40rpx;
  93. height: 40rpx;
  94. border-radius: 50%;
  95. border: 1px solid;
  96. }
  97. .action{
  98. width: 30rpx;
  99. height: 30rpx;
  100. border-radius: 50%;
  101. background-color: $uni-bg-color;
  102. }
  103. }
  104. }
  105. }
  106. .empty{
  107. height: 60vh;
  108. }
  109. .footer-fixed {
  110. position: fixed;
  111. bottom: var(--window-bottom);
  112. left: 0;
  113. right: 0;
  114. z-index: 11;
  115. box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
  116. background: #fff;
  117. // 设置ios刘海屏底部横线安全区域
  118. padding-bottom: constant(safe-area-inset-bottom);
  119. padding-bottom: env(safe-area-inset-bottom);
  120. .btn {
  121. padding: 20rpx 40rpx;
  122. /deep/ button {
  123. width: 100%;
  124. line-height: 60rpx;
  125. font-size: 28rpx;
  126. height: 60rpx;
  127. color: #fff;
  128. background-color: $uni-bg-color;
  129. border: none;
  130. border-radius: 100rpx;
  131. }
  132. }
  133. }
  134. </style>