recruitsNumber.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. ybmNum.value = res.data.total;
  54. queryParams.value.page++;
  55. if(res.data.list.length===0) isOver.value = true
  56. })
  57. }
  58. onLoad((options)=>{
  59. recruitmentMax.value = +options.recruitmentMax??0;
  60. recruitmentMin.value = +options.recruitmentMin??0;
  61. queryParams.value.activityId = options?.activityId||'';
  62. getList()
  63. })
  64. </script>
  65. <style scoped lang="scss">
  66. .common_page{
  67. .box{
  68. margin-top: 20rpx;
  69. background: #FFFFFF;
  70. border-radius: 24rpx;
  71. }
  72. .num{
  73. padding: 6rpx 24rpx 30rpx;
  74. display: flex;
  75. flex-wrap: wrap;
  76. &-pre{
  77. width: 50%;
  78. margin-top: 24rpx;
  79. font-family: PingFangSC, PingFang SC;
  80. font-weight: 400;
  81. font-size: 30rpx;
  82. color: #676775;
  83. line-height: 42rpx;
  84. &.line{
  85. border-left: 1rpx solid #E5E0E0;
  86. padding-left: 40rpx;
  87. box-sizing: border-box;
  88. }
  89. text{
  90. font-weight: bold;
  91. color: #176892;
  92. margin-left: 24rpx;
  93. }
  94. }
  95. }
  96. .list{
  97. padding: 0 24rpx;
  98. flex: 1;
  99. overflow: auto;
  100. &-pre{
  101. padding: 32rpx 0;
  102. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  103. &-left{
  104. image{
  105. width: 64rpx;
  106. height: 64rpx;
  107. }
  108. text{
  109. font-family: PingFang-SC, PingFang-SC;
  110. font-weight: bold;
  111. font-size: 30rpx;
  112. color: #252525;
  113. line-height: 42rpx;
  114. margin-left: 30rpx;
  115. }
  116. .sex{
  117. width: 44rpx;
  118. height: 32rpx;
  119. margin-left: 10rpx;
  120. }
  121. }
  122. &-right{
  123. font-family: PingFangSC, PingFang SC;
  124. font-weight: 400;
  125. font-size: 28rpx;
  126. color: #676775;
  127. line-height: 40rpx;
  128. text-align: right;
  129. }
  130. }
  131. }
  132. .empty{
  133. flex: 1;
  134. font-family: PingFangSC, PingFang SC;
  135. font-weight: 400;
  136. font-size: 30rpx;
  137. color: #252525;
  138. line-height: 42rpx;
  139. text-align: center;
  140. }
  141. }
  142. </style>