index.vue 3.3 KB

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