exclusiveScroll.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="我的专享卷" bgColor="#FFFFFF"></cus-header>
  4. <div class="tab adf">
  5. <div class="tab-pre adfacjc" :class="{'active':tidx===0}" @tap="changeTab(0)">未使用</div>
  6. <div class="tab-pre adfacjc" :class="{'active':tidx===1}" @tap="changeTab(1)">已使用</div>
  7. <div class="tab-pre adfacjc" :class="{'active':tidx===2}" @tap="changeTab(2)">已过期</div>
  8. </div>
  9. <div class="list">
  10. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  11. <up-list-item v-for="(item, index) in list" :key="index">
  12. <div class="box" :style="{'margin-top':index===0?0:'24rpx'}">
  13. <div class="box-top">
  14. <div class="box-top-title">{{'活动专享卷'}}</div>
  15. <div class="box-top-tip">{{'环保知识知多少? 让孩子成为大自然的守护者!'}}</div>
  16. <div class="box-top-date adfacjb">
  17. <div class="box-top-date-left">有效期至{{'2025.07.30 23:59'}}</div>
  18. <div class="box-top-date-right">立即使用</div>
  19. </div>
  20. </div>
  21. <div class="box-bottom adf" @tap="handleExpand(item,index)">
  22. <div class="box-bottom-left">
  23. <div class="h" v-if="!item.select">本券仅限报名指定活动使用,不可用于其他场景</div>
  24. <div class="s" v-else>
  25. <div class="p">1.适用范围:本券仅限报名指定活动使用;</div>
  26. <div class="p">2.使用方式:在报名指定活动时将自动抵扣爱心值;</div>
  27. <div class="p">3.不退不换:券一经使用,不可退还、不可取消;</div>
  28. <div class="p">4.有效期:请于券面标注日期前使用,逾期自动失效。</div>
  29. </div>
  30. </div>
  31. <div class="box-bottom-right">
  32. <up-icon name="arrow-right" color="#CBCBCB" size="32rpx" v-if="!item.select"></up-icon>
  33. <up-icon name="arrow-up" color="#CBCBCB" size="32rpx" v-else></up-icon>
  34. </div>
  35. </div>
  36. </div>
  37. </up-list-item>
  38. </up-list>
  39. </div>
  40. </view>
  41. </template>
  42. <script setup name="">
  43. import CusHeader from '@/components/CusHeader/index.vue'
  44. import { ref } from 'vue'
  45. const tidx = ref(0)
  46. const list = ref(
  47. [{status:0,select:false},
  48. {status:0,select:false},
  49. {status:0,select:false},
  50. {status:0,select:false}]
  51. )
  52. const changeTab = index => {
  53. tidx.value = index;
  54. }
  55. const handleExpand = (item,index) => {
  56. list.value[index].select = !list.value[index].select;
  57. }
  58. </script>
  59. <style scoped lang="scss">
  60. .common_page{
  61. padding: 0 0 40rpx;
  62. .tab{
  63. width: 100%;
  64. height: 110rpx;
  65. background: #FFFFFF;
  66. &-pre{
  67. width: 50%;
  68. height: 110rpx;
  69. position: relative;
  70. font-family: PingFangSC, PingFang SC;
  71. font-weight: 400;
  72. font-size: 28rpx;
  73. color: #6B7280;
  74. line-height: 28rpx;
  75. &.active{
  76. font-weight: bold;
  77. font-size: 32rpx;
  78. color: #252525;
  79. line-height: 32rpx;
  80. &::after{
  81. content: '';
  82. width: 120rpx;
  83. height: 6rpx;
  84. background: #252525;
  85. border-radius: 3rpx;
  86. position: absolute;
  87. left: 50%;
  88. margin-left: -60rpx;
  89. bottom: 6rpx;
  90. }
  91. }
  92. }
  93. }
  94. .list{
  95. margin-top: 20rpx;
  96. padding: 0 24rpx;
  97. flex: 1;
  98. overflow: auto;
  99. .box{
  100. &-top{
  101. border-radius: 24rpx 24rpx 0 0;
  102. padding: 40rpx 24rpx 24rpx;
  103. background: linear-gradient(90deg,#FBE9CA 50%,#FCF3E4 100%);
  104. &-title{
  105. font-family: PingFang-SC, PingFang-SC;
  106. font-weight: bold;
  107. font-size: 36rpx;
  108. color: #7E541A;
  109. line-height: 36rpx;
  110. }
  111. &-tip{
  112. font-family: PingFangSC, PingFang SC;
  113. font-weight: 400;
  114. font-size: 24rpx;
  115. color: #AA7633;
  116. line-height: 24rpx;
  117. margin-top: 20rpx;
  118. }
  119. &-date{
  120. margin-top: 42rpx;
  121. &-left{
  122. font-family: PingFangSC, PingFang SC;
  123. font-weight: 400;
  124. font-size: 24rpx;
  125. color: #AA7633;
  126. line-height: 40rpx;
  127. }
  128. &-right{
  129. padding: 8rpx 20rpx;
  130. background: #AA7633;
  131. border-radius: 24rpx;
  132. font-family: PingFangSC, PingFang SC;
  133. font-weight: 400;
  134. font-size: 24rpx;
  135. color: #FFFFFF;
  136. line-height: 33rpx;
  137. }
  138. }
  139. }
  140. &-bottom{
  141. border-radius: 0 0 24rpx 24rpx;
  142. background: #FFFFFF;
  143. padding: 16rpx 24rpx;
  144. &-left{
  145. width: calc(100% - 54rpx);
  146. .h{
  147. font-family: PingFangSC, PingFang SC;
  148. font-weight: 400;
  149. font-size: 24rpx;
  150. color: #A4A4A4;
  151. line-height: 40rpx;
  152. overflow: hidden;
  153. text-overflow: ellipsis;
  154. white-space: nowrap;
  155. }
  156. .s{
  157. .p{
  158. font-family: PingFangSC, PingFang SC;
  159. font-weight: 400;
  160. font-size: 24rpx;
  161. color: #A4A4A4;
  162. line-height: 44rpx;
  163. }
  164. }
  165. }
  166. &-right{
  167. width: 32rpx;
  168. height: 32rpx;
  169. padding-top: 4rpx;
  170. }
  171. }
  172. }
  173. }
  174. }
  175. </style>