recruitsNumber.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. <view class="list-pre adfacjb" v-for="(item,index) in list" :key="index">
  11. <view class="list-pre-left adfac">
  12. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/a56db26d-4149-4f6a-8272-2c3d4af0a6a8.png"></image>
  13. <text>{{item.name||''}}</text>
  14. </view>
  15. <view class="list-pre-right">{{item.createDate||''}}</view>
  16. </view>
  17. </view>
  18. <view class="empty adffcacjc" v-else>
  19. 暂无善行少年报名<br>期待您的参与
  20. </view>
  21. </view>
  22. </template>
  23. <script setup name="">
  24. import CusHeader from '@/components/CusHeader/index.vue'
  25. import { onLoad } from '@dcloudio/uni-app'
  26. import { ref, onMounted, getCurrentInstance } from 'vue'
  27. const { proxy } = getCurrentInstance()
  28. const list = ref([])
  29. const recruitmentMax = ref('')
  30. const recruitmentMin = ref('')
  31. const ybmNum = ref(0)
  32. const getList = (activityId) => {
  33. proxy.$api.get('/core/activity/signup/getSignupList',{page:1,limit:-1,activityId}).then(({data:res})=>{
  34. if(res.code!==0) return proxy.$showToast(res.msg)
  35. list.value = res.data.list;
  36. ybmNum.value = list.value.filter(l=>l.signupState==1).length||0;
  37. })
  38. }
  39. onLoad((options)=>{
  40. recruitmentMax.value = +options.recruitmentMax??0;
  41. recruitmentMin.value = +options.recruitmentMin??0;
  42. getList(options?.activityId)
  43. })
  44. </script>
  45. <style scoped lang="scss">
  46. .common_page{
  47. .box{
  48. margin-top: 20rpx;
  49. background: #FFFFFF;
  50. border-radius: 24rpx;
  51. }
  52. .num{
  53. padding: 6rpx 24rpx 30rpx;
  54. display: flex;
  55. flex-wrap: wrap;
  56. &-pre{
  57. width: 50%;
  58. margin-top: 24rpx;
  59. font-family: PingFangSC, PingFang SC;
  60. font-weight: 400;
  61. font-size: 30rpx;
  62. color: #676775;
  63. line-height: 42rpx;
  64. &.line{
  65. border-left: 1rpx solid #E5E0E0;
  66. padding-left: 40rpx;
  67. box-sizing: border-box;
  68. }
  69. text{
  70. font-weight: bold;
  71. color: #176892;
  72. margin-left: 24rpx;
  73. }
  74. }
  75. }
  76. .list{
  77. padding: 0 24rpx;
  78. flex: 1;
  79. overflow: auto;
  80. &-pre{
  81. padding: 32rpx 0;
  82. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  83. &-left{
  84. image{
  85. width: 64rpx;
  86. height: 64rpx;
  87. }
  88. text{
  89. font-family: PingFang-SC, PingFang-SC;
  90. font-weight: bold;
  91. font-size: 30rpx;
  92. color: #252525;
  93. line-height: 42rpx;
  94. margin-left: 30rpx;
  95. }
  96. }
  97. &-right{
  98. font-family: PingFangSC, PingFang SC;
  99. font-weight: 400;
  100. font-size: 28rpx;
  101. color: #676775;
  102. line-height: 40rpx;
  103. text-align: right;
  104. }
  105. }
  106. }
  107. .empty{
  108. flex: 1;
  109. font-family: PingFangSC, PingFang SC;
  110. font-weight: 400;
  111. font-size: 30rpx;
  112. color: #252525;
  113. line-height: 42rpx;
  114. text-align: center;
  115. }
  116. }
  117. </style>