recruitsNumber.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. <view class="box num">
  5. <view class="num-pre">招募人数<text>{{recruitmentMax?(recruitmentMax+'人'):'无限制'}}</text></view>
  6. <view class="num-pre line">已报名<text>{{ybmNum}}人</text></view>
  7. <view class="num-pre">最少报名人数<text>{{recruitmentMax?(recruitmentMin+'人'):'无限制'}}</text></view>
  8. </view>
  9. <view class="box list" v-if="list.length">
  10. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  11. <up-list-item v-for="(item, index) in list" :key="item.id">
  12. <view class="list-pre adfacjb">
  13. <view class="list-pre-left adfac">
  14. <image src="https://oss.familydaf.cn/sxsnfile/20251218/3821654e080945998d464f3c3aa64122.png"></image>
  15. <text>{{item.name||''}}</text>
  16. <image class="sex" v-if="item?.gender==1" src="https://oss.familydaf.cn/sxsnfile/20251218/473d5677fbdb4106acdb9a163377d27f.png"></image>
  17. <image class="sex" v-else-if="item?.gender==0" src="https://oss.familydaf.cn/sxsnfile/20251218/02bc40a1c47b40f1a36b55cd0553211c.png"></image>
  18. </view>
  19. <view class="list-pre-right">{{item.createDate||''}}</view>
  20. </view>
  21. </up-list-item>
  22. </up-list>
  23. </view>
  24. <view class="empty adffcacjc" v-else>
  25. 暂无善行少年报名<br>期待您的参与
  26. </view>
  27. </view>
  28. </template>
  29. <script setup name="">
  30. import CusHeader from '@/components/CusHeader/index.vue'
  31. import { onLoad } from '@dcloudio/uni-app'
  32. import { ref, onMounted, getCurrentInstance } from 'vue'
  33. const { proxy } = getCurrentInstance()
  34. const queryParams = ref({
  35. page:1,
  36. limit:10,
  37. activityId:'',
  38. signupState:1
  39. })
  40. const isOver = ref(false)
  41. const list = ref([])
  42. const recruitmentMax = ref('')
  43. const recruitmentMin = ref('')
  44. const ybmNum = ref(0)
  45. const scrolltolower = () => {
  46. if(isOver.value) return
  47. getList()
  48. }
  49. const getList = () => {
  50. proxy.$api.get('/core/activity/signup/getSignupList',queryParams.value).then(({data:res})=>{
  51. if(res.code!==0) return proxy.$showToast(res.msg)
  52. list.value = [...list.value,...res.data.list];
  53. list.value.forEach(l=>{
  54. l.createDate = new Date(l.createDate).Format('yyyy.MM.dd hh:mm:ss')
  55. })
  56. ybmNum.value = res.data.total;
  57. queryParams.value.page++;
  58. if(res.data.list.length===0) isOver.value = true
  59. })
  60. }
  61. onLoad((options)=>{
  62. recruitmentMax.value = +options.recruitmentMax??0;
  63. recruitmentMin.value = +options.recruitmentMin??0;
  64. queryParams.value.activityId = options?.activityId||'';
  65. getList()
  66. })
  67. </script>
  68. <style scoped lang="scss">
  69. .common_page{
  70. .box{
  71. margin-top: 20rpx;
  72. background: #FFFFFF;
  73. border-radius: 24rpx;
  74. }
  75. .num{
  76. padding: 6rpx 24rpx 30rpx;
  77. display: flex;
  78. flex-wrap: wrap;
  79. &-pre{
  80. width: 50%;
  81. margin-top: 24rpx;
  82. font-family: PingFangSC, PingFang SC;
  83. font-weight: 400;
  84. font-size: 30rpx;
  85. color: #676775;
  86. line-height: 42rpx;
  87. &.line{
  88. border-left: 1rpx solid #E5E0E0;
  89. padding-left: 40rpx;
  90. box-sizing: border-box;
  91. }
  92. text{
  93. font-weight: bold;
  94. color: #176892;
  95. margin-left: 24rpx;
  96. }
  97. }
  98. }
  99. .list{
  100. padding: 0 24rpx;
  101. flex: 1;
  102. overflow: auto;
  103. &-pre{
  104. padding: 32rpx 0;
  105. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  106. &-left{
  107. image{
  108. width: 64rpx;
  109. height: 64rpx;
  110. }
  111. text{
  112. font-family: PingFang-SC, PingFang-SC;
  113. font-weight: bold;
  114. font-size: 30rpx;
  115. color: #252525;
  116. line-height: 42rpx;
  117. margin-left: 30rpx;
  118. }
  119. .sex{
  120. width: 44rpx;
  121. height: 32rpx;
  122. margin-left: 10rpx;
  123. }
  124. }
  125. &-right{
  126. font-family: PingFangSC, PingFang SC;
  127. font-weight: 400;
  128. font-size: 28rpx;
  129. color: #676775;
  130. line-height: 40rpx;
  131. text-align: right;
  132. }
  133. }
  134. }
  135. .empty{
  136. flex: 1;
  137. font-family: PingFangSC, PingFang SC;
  138. font-weight: 400;
  139. font-size: 30rpx;
  140. color: #252525;
  141. line-height: 42rpx;
  142. text-align: center;
  143. }
  144. }
  145. </style>