金诚优选前端代码
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.

161 lines
3.5 KiB

  1. <template>
  2. <view>
  3. <lf-nav :spreadOut="true" :showIcon="true" bgColor="white" title="优惠券"></lf-nav>
  4. <view class="special_tab">
  5. <u-tabs :list="tab_list" active-color="#15716E" inactive-color='#777777' :is-scroll="true" :current="current" @change="tabChange"></u-tabs>
  6. </view>
  7. <view class="coupon-wrap">
  8. <view class="coupon-card lf-m-b-30" v-for="i of 3">
  9. <view class="coupon-circle-top">
  10. <view class="coupon-circle1"></view>
  11. </view>
  12. <view class="coupon-circle-bottom">
  13. <view class="coupon-circle1"></view>
  14. </view>
  15. <view class="coupon-radius">
  16. <view class="coupon-left">
  17. <view class="lf-font-24 lf-color-white"><text class="lf-font-36 lf-color-white lf-font-bold">200</text></view>
  18. <view class="coupon-tag">
  19. 待使用
  20. </view>
  21. </view>
  22. <view class="coupon-right">
  23. <view class="lf-font-32 lf-font-bold lf-color-white">满1200减200</view>
  24. <view class="lf-font-24 lf-color-white">有效期2021.09.09-2021-09.15</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. current: 0,
  36. tab_list: [
  37. {name: '全部'},
  38. {name: '待使用'},
  39. {name: '已使用'},
  40. {name: '已过期'}
  41. ]
  42. }
  43. },
  44. methods: {
  45. tabChange(index){
  46. this.current = index;
  47. },
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .coupon-circle1 {
  53. width: 40rpx;
  54. height: 40rpx;
  55. background-color: white;
  56. border-radius: 50%;
  57. }
  58. .coupon-circle-top {
  59. width: 50rpx;
  60. height: 50rpx;
  61. border-radius: 50%;
  62. // background-color: red;
  63. position: absolute;
  64. border: 1px dashed #ccc;
  65. left: 190rpx;
  66. top: -20rpx;
  67. display: flex;
  68. align-items: center;
  69. text-align: center;
  70. justify-content: center;
  71. }
  72. .coupon-circle-bottom {
  73. width: 50rpx;
  74. height: 50rpx;
  75. border-radius: 50%;
  76. // background-color: red;
  77. position: absolute;
  78. border: 1px dashed #ccc;
  79. left: 190rpx;
  80. bottom: -20rpx;
  81. display: flex;
  82. align-items: center;
  83. text-align: center;
  84. justify-content: center;
  85. }
  86. .coupon-right {
  87. text-align: left;
  88. justify-content: center;
  89. align-items: flex-start;
  90. display: flex;
  91. flex-direction: column;
  92. margin-left: 84rpx;
  93. }
  94. .coupon-left {
  95. margin-left: 40rpx;
  96. display: flex;
  97. flex-direction: column;
  98. justify-content: center;
  99. align-items: center;
  100. }
  101. .coupon-tag {
  102. width: max-content;
  103. margin-top: 10rpx;
  104. padding: 0 24rpx;
  105. height: 43rpx;
  106. border-radius: 22rpx;
  107. border: 2rpx solid #FFFFFF;
  108. font-size: 24rpx;
  109. color: white;
  110. }
  111. .coupon-wrap {
  112. display: flex;
  113. justify-content: center;
  114. margin-top: 30rpx;
  115. flex-direction: column;
  116. align-content: center;
  117. align-items: center;
  118. }
  119. .coupon-card {
  120. overflow: hidden;
  121. position: relative;
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. width: 674rpx;
  126. // display: flex;
  127. height: 171rpx;
  128. // opacity: 0.59;
  129. // border: 1rpx solid #FFFFFF;
  130. background: #15716E;
  131. border-radius: 20rpx;
  132. }
  133. .coupon-radius {
  134. width: 664rpx;
  135. display: flex;
  136. height: 161rpx;
  137. border: 1rpx dashed #ccc;
  138. // background: #15716E;
  139. border-radius: 20rpx;
  140. }
  141. /deep/.u-scroll-box {
  142. display: flex;
  143. justify-content: center;
  144. align-items: center;
  145. border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
  146. }
  147. /deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
  148. background-color: #15716E!important;
  149. width: 80rpx!important;
  150. position: absolute;
  151. height: 10rpx;
  152. left: 0;
  153. border-radius: 8rpx 8rpx 0px 0px!important;
  154. bottom: -12rpx;
  155. }
  156. /deep/ .u-tab-item {
  157. font-size: 28rpx!important;
  158. }
  159. </style>