index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="nonprofit-activety" @tap.self="handleDetail({})" v-if="item">
  3. <div class="na-top adf">
  4. <div class="na-top-left">
  5. <image :src="item.coverFile"></image>
  6. </div>
  7. <div class="na-top-right">
  8. <p>{{item.activityName||''}}</p>
  9. <div class="tip adf">
  10. <div class="tip-left adfac">
  11. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/201a4250-24a4-412d-9ec9-fc58071d10ea.png"></image>
  12. <text>截止报名:</text>
  13. </div>
  14. <!-- <div class="tip-right">{{item.endTimeText}}</div> -->
  15. <div class="tip-right">{{item.signupEndTime||'暂无'}}</div>
  16. </div>
  17. <div class="tip adf">
  18. <div class="tip-left adfac">
  19. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/e9025f86-a59e-4f82-92f0-9d22e846193c.png"></image>
  20. <text>活动地点:</text>
  21. </div>
  22. <div class="tip-right">{{item.provinceName||''}}{{item.cityName||''}}</div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="na-bottom adfacjb">
  27. <div class="na-bottom-left adf">
  28. 已报名&nbsp;&nbsp;<strong>{{item.recruitmentNow}}</strong>/{{item.recruitmentMax===0?'无限制':(item.recruitmentMax+'&nbsp;&nbsp;人')}}
  29. </div>
  30. <!-- <div class="na-bottom-right" @tap.stop="toApply">立即报名</div> -->
  31. </div>
  32. </view>
  33. </template>
  34. <script setup name="nonprofitActivety">
  35. defineProps({
  36. item:{
  37. typeof:Object,
  38. default:null
  39. }
  40. })
  41. import { ref } from 'vue'
  42. import { useUserStore } from '@/common/stores/user';
  43. const userStore = useUserStore();
  44. const handleDetail = item => {
  45. uni.navigateTo({
  46. url:'/pagesHome/activityDetail'
  47. })
  48. }
  49. const toApply = () => {
  50. userStore.openLoginModal();
  51. }
  52. </script>
  53. <style scoped lang="scss">
  54. .nonprofit-activety{
  55. background: linear-gradient( 45deg, #FFFFFF 80%, #F2FFE8 100%);
  56. border-radius: 24rpx;
  57. padding: 36rpx 24rpx 32rpx;
  58. margin-top: 20rpx;
  59. .na-top{
  60. &-left{
  61. width: 158rpx;
  62. height: 214rpx;
  63. image{
  64. width: 100%;
  65. height: 100%;
  66. }
  67. }
  68. &-right{
  69. width: calc(100% - 158rpx);
  70. padding-left: 20rpx;
  71. box-sizing: border-box;
  72. &>p{
  73. font-family: PingFang-SC, PingFang-SC;
  74. font-weight: bold;
  75. font-size: 32rpx;
  76. color: #151B29;
  77. line-height: 40rpx;
  78. margin-bottom: 5rpx;
  79. }
  80. .tip{
  81. margin-top: 25rpx;
  82. &-left{
  83. width: 160rpx;
  84. image{
  85. width: 24rpx;
  86. height: 24rpx;
  87. }
  88. text{
  89. font-family: PingFangSC, PingFang SC;
  90. font-weight: 400;
  91. font-size: 24rpx;
  92. color: #676775;
  93. line-height: 24rpx;
  94. margin-left: 10rpx;
  95. }
  96. }
  97. &-right{
  98. width: calc(100% - 160rpx);
  99. font-family: PingFangSC, PingFang SC;
  100. font-weight: 400;
  101. font-size: 24rpx;
  102. color: #676775;
  103. line-height: 24rpx;
  104. margin-left: 10rpx;
  105. }
  106. }
  107. }
  108. }
  109. .na-bottom{
  110. margin-top: 24rpx;
  111. &-left{
  112. font-family: PingFangSC, PingFang SC;
  113. font-weight: 400;
  114. font-size: 24rpx;
  115. color: #676775;
  116. line-height: 24rpx;
  117. }
  118. &-right{
  119. background: #B7F358;
  120. border-radius: 27rpx;
  121. padding: 12rpx 30rpx;
  122. font-family: PingFang-SC, PingFang-SC;
  123. font-weight: bold;
  124. font-size: 24rpx;
  125. color: #151B29;
  126. line-height: 30rpx;
  127. }
  128. }
  129. }
  130. </style>