exclusiveScroll.vue 5.7 KB

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