index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="container">
  3. <!-- 优惠券的可用和失效 -->
  4. <view class="use">
  5. <u-tabs
  6. :list="list2"
  7. lineWidth="70"
  8. lineColor="#347caf"
  9. :scrollable="false"
  10. :activeStyle="{
  11. color: '#347caf',
  12. fontWeight: 'bold',
  13. transform: 'scale(1.05)',
  14. }"
  15. :inactiveStyle="{
  16. color: '#b7b6b8',
  17. transform: 'scale(1)',
  18. }"
  19. itemStyle="padding-left: 90rpx; padding-right: 80rpx; height: 120rpx;"
  20. />
  21. </view>
  22. <!-- 优惠券可用 -->
  23. <view class="couponUse">
  24. <view class="useLeft">
  25. <view>满500减100元</view>
  26. <text>2320-07-02 ~ 202-08-03</text>
  27. </view>
  28. <view class="useRight">
  29. <view class="text">2<text>折</text></view>
  30. <view>折扣</view>
  31. <view class="gouUse">去使用</view>
  32. </view>
  33. </view>
  34. <!-- 优惠券失效 -->
  35. <view class="couponDisUse couponUse">
  36. <view class="useLeft">
  37. <view>满500减100元</view>
  38. <text>2320-07-02 ~ 202-08-03</text>
  39. </view>
  40. <view class="useRight">
  41. <view class="text">2<text>折</text></view>
  42. <view>折扣</view>
  43. <view class="gouUse">去使用</view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. export default {
  50. data() {
  51. return {
  52. list: [
  53. {
  54. id: 0,
  55. name: '通用',
  56. },
  57. {
  58. id: 1,
  59. name: '满减',
  60. },
  61. {
  62. id: 2,
  63. name: '折扣',
  64. },
  65. {
  66. id: 3,
  67. name: '赠送',
  68. },
  69. ],
  70. list2: [
  71. {
  72. name: '可用',
  73. },
  74. {
  75. name: '失效',
  76. },
  77. ],
  78. current: 1,
  79. };
  80. },
  81. methods: {
  82. sectionChange() {},
  83. },
  84. };
  85. </script>
  86. <style lang="scss" scoped>
  87. .container {
  88. height: 100vh;
  89. background-color: #efefef;
  90. .use {
  91. padding: 0 140rpx;
  92. }
  93. /* 优惠券可用 */
  94. .couponUse {
  95. margin: 20rpx 30rpx;
  96. height: 200rpx;
  97. display: flex;
  98. background-color: #fff;
  99. box-sizing: border-box;
  100. .useLeft {
  101. width: 380rpx;
  102. padding: 20rpx;
  103. > view {
  104. font-size: 40rpx;
  105. margin: 20rpx;
  106. color: #333;
  107. }
  108. > text {
  109. font-size: 28rpx;
  110. color: #5f5f5f;
  111. }
  112. }
  113. .useRight {
  114. height: 100%;
  115. padding: 10rpx;
  116. color: #fff;
  117. text-align: center;
  118. box-sizing: border-box;
  119. width: calc(100% - 380rpx);
  120. background-color: #347caf;
  121. .text {
  122. font-size: 50rpx;
  123. > text {
  124. margin-left: 5rpx;
  125. font-size: 24rpx;
  126. }
  127. }
  128. .gouUse {
  129. width: 180rpx;
  130. height: 60rpx;
  131. line-height: 60rpx;
  132. color: #347caf;
  133. margin: 16rpx 0 0 60rpx;
  134. background-color: #fff;
  135. }
  136. }
  137. }
  138. .couponDisUse {
  139. .useRight {
  140. background-color: #cecece;
  141. .gouUse {
  142. color: #cecece;
  143. }
  144. }
  145. }
  146. }
  147. </style>