exclusiveScroll.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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" v-if="list.length">
  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. <div class="empty adffcacjc" v-else>
  43. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/478d380c-2d22-4ce0-828f-b6b454571a6c.png"></image>
  44. <text>没有卷</text>
  45. </div>
  46. </view>
  47. </template>
  48. <script setup name="">
  49. import CusHeader from '@/components/CusHeader/index.vue'
  50. import { ref } from 'vue'
  51. const tidx = ref(0)
  52. const list = ref(
  53. [{status:0,select:false},
  54. {status:0,select:false},
  55. {status:0,select:false},
  56. {status:0,select:false},
  57. {status:0,select:false}]
  58. )
  59. const changeTab = index => {
  60. tidx.value = index;
  61. }
  62. const handleExpand = (item,index) => {
  63. list.value[index].select = !list.value[index].select;
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .common_page{
  68. padding: 0 0 40rpx;
  69. .tab{
  70. width: 100%;
  71. height: 110rpx;
  72. background: #FFFFFF;
  73. &-pre{
  74. width: 50%;
  75. height: 110rpx;
  76. position: relative;
  77. font-family: PingFangSC, PingFang SC;
  78. font-weight: 400;
  79. font-size: 28rpx;
  80. color: #6B7280;
  81. line-height: 28rpx;
  82. &.active{
  83. font-weight: bold;
  84. font-size: 32rpx;
  85. color: #252525;
  86. line-height: 32rpx;
  87. &::after{
  88. content: '';
  89. width: 120rpx;
  90. height: 6rpx;
  91. background: #252525;
  92. border-radius: 3rpx;
  93. position: absolute;
  94. left: 50%;
  95. margin-left: -60rpx;
  96. bottom: 6rpx;
  97. }
  98. }
  99. }
  100. }
  101. .list{
  102. margin-top: 20rpx;
  103. padding: 0 24rpx;
  104. flex: 1;
  105. overflow: auto;
  106. .box{
  107. position: relative;
  108. &-img{
  109. width: 128rpx;
  110. height: 118rpx;
  111. position: absolute;
  112. top: 0;
  113. right: 0;
  114. }
  115. &-top{
  116. border-radius: 24rpx 24rpx 0 0;
  117. padding: 40rpx 24rpx 24rpx;
  118. background: linear-gradient(90deg,#FBE9CA 50%,#FCF3E4 100%);
  119. &-title{
  120. font-family: PingFang-SC, PingFang-SC;
  121. font-weight: bold;
  122. font-size: 36rpx;
  123. color: #7E541A;
  124. line-height: 36rpx;
  125. }
  126. &-tip{
  127. font-family: PingFangSC, PingFang SC;
  128. font-weight: 400;
  129. font-size: 24rpx;
  130. color: #AA7633;
  131. line-height: 24rpx;
  132. margin-top: 20rpx;
  133. }
  134. &-date{
  135. margin-top: 42rpx;
  136. &-left{
  137. font-family: PingFangSC, PingFang SC;
  138. font-weight: 400;
  139. font-size: 24rpx;
  140. color: #AA7633;
  141. line-height: 40rpx;
  142. }
  143. &-right{
  144. padding: 8rpx 20rpx;
  145. background: #AA7633;
  146. border-radius: 24rpx;
  147. font-family: PingFangSC, PingFang SC;
  148. font-weight: 400;
  149. font-size: 24rpx;
  150. color: #FFFFFF;
  151. line-height: 33rpx;
  152. }
  153. }
  154. }
  155. &-bottom{
  156. border-radius: 0 0 24rpx 24rpx;
  157. background: #FFFFFF;
  158. padding: 16rpx 24rpx;
  159. &-left{
  160. width: calc(100% - 54rpx);
  161. .h{
  162. font-family: PingFangSC, PingFang SC;
  163. font-weight: 400;
  164. font-size: 24rpx;
  165. color: #A4A4A4;
  166. line-height: 40rpx;
  167. overflow: hidden;
  168. text-overflow: ellipsis;
  169. white-space: nowrap;
  170. }
  171. .s{
  172. .p{
  173. font-family: PingFangSC, PingFang SC;
  174. font-weight: 400;
  175. font-size: 24rpx;
  176. color: #A4A4A4;
  177. line-height: 44rpx;
  178. }
  179. }
  180. }
  181. &-right{
  182. width: 32rpx;
  183. height: 32rpx;
  184. padding-top: 4rpx;
  185. }
  186. }
  187. &.grey{
  188. .box-top{
  189. background: #FFFFFF;
  190. &-title{
  191. color: #657588;
  192. }
  193. &-tip,&-date-left{
  194. color: #A4A4A4;
  195. }
  196. }
  197. }
  198. }
  199. }
  200. .empty{
  201. flex: 1;
  202. image{
  203. width: 184rpx;
  204. height: 113rpx;
  205. }
  206. text{
  207. font-family: PingFangSC, PingFang SC;
  208. font-weight: 400;
  209. font-size: 32rpx;
  210. color: #252525;
  211. line-height: 45rpx;
  212. margin-top: 60rpx;
  213. }
  214. }
  215. }
  216. </style>