index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view class="ni" v-if="item">
  3. <view class="ni-top adfacjb">
  4. <view class="ni-top-left adfac">
  5. <image class="avatar" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/4bd05666-201c-4016-acb6-09cd1f554524.png"></image>
  6. <view class="name">{{item?.memberName||''}}</view>
  7. <image class="sex" v-if="item?.gender==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
  8. <image class="sex" v-else-if="item?.gender==0" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
  9. <view class="age" :class="{'women':item?.gender==1,'man':item?.gender==0}">{{item?.age||0}}岁</view>
  10. </view>
  11. <view class="ni-top-right" :class="{'grey':item.signupState==-1||item.signupState==3}">{{statusDict[item?.signupState]||''}}</view>
  12. </view>
  13. <view class="ni-info adfacjb">
  14. <view class="ni-info-left">
  15. <image :src="item?.coverFile||''"></image>
  16. </view>
  17. <view class="ni-info-right">
  18. <view class="title">{{item?.activityName||''}}</view>
  19. <view class="tip adf">
  20. <view class="tip-left adfac">
  21. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/201a4250-24a4-412d-9ec9-fc58071d10ea.png"></image>
  22. <text>活动时间:</text>
  23. </view>
  24. <view class="tip-right">{{item?.activityStartTime||''}} ~ {{item?.activityEndTime||''}}</view>
  25. </view>
  26. <view class="tip adf">
  27. <view class="tip-left adfac">
  28. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/e9025f86-a59e-4f82-92f0-9d22e846193c.png"></image>
  29. <text>活动地点:</text>
  30. </view>
  31. <view class="tip-right">{{item?.provinceName||''}}{{item?.cityName||''}}</view>
  32. </view>
  33. <view class="bottom">
  34. <view class="btn" v-if="item.activeState==1&&item.signupState==1">取消报名</view>
  35. <view class="btn" v-if="item.activeState==1&&item.signupState==-1">立即报名</view>
  36. <view class="btn" v-if="item.activeState==2&&item.signupState==1">去签到</view>
  37. <view class="btn" v-if="item.activeState==3&&item.signupState==2">写档案</view>
  38. <view class="btn" v-if="item.activeState==3&&item.signupState==3">查看档案</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script setup name="NonprofitItem">
  45. import { ref } from 'vue'
  46. const props = defineProps({
  47. item:{
  48. typeof:Object,
  49. default:null
  50. }
  51. })
  52. const statusDict = ref({
  53. '-1':'已取消',
  54. 1:'已报名',
  55. 2:'已签到',
  56. 3:'已完成'
  57. })
  58. const btnTextDict = ref({
  59. 1:'取消报名',
  60. 2:'去签到',
  61. 3:'填写公益档案'
  62. })
  63. </script>
  64. <style scoped lang="scss">
  65. .ni{
  66. background: #FFFFFF;
  67. border-radius: 24rpx;
  68. padding: 40rpx 24rpx 32rpx;
  69. margin-top: 20rpx;
  70. &-top{
  71. &-left{
  72. .avatar{
  73. width: 48rpx;
  74. height: 48rpx;
  75. }
  76. .name{
  77. font-family: PingFang-SC, PingFang-SC;
  78. font-weight: bold;
  79. font-size: 32rpx;
  80. color: #151B29;
  81. line-height: 32rpx;
  82. margin-left: 16rpx;
  83. }
  84. .sex{
  85. width: 44rpx;
  86. height: 32rpx;
  87. margin-left: 10rpx;
  88. }
  89. .age{
  90. border-radius: 13rpx;
  91. font-family: PingFangSC, PingFang SC;
  92. font-weight: 400;
  93. font-size: 20rpx;
  94. line-height: 24rpx;
  95. padding: 4rpx 10rpx;
  96. margin-left: 13rpx;
  97. &.women{
  98. background: rgba(244,101,122,0.14);
  99. color: #F4657A;
  100. }
  101. &.man{
  102. background: rgba(5,169,254,0.12);
  103. color: #05A9FE;
  104. }
  105. }
  106. }
  107. &-right{
  108. background: rgba(183, 243, 88, .2);
  109. border-radius: 27rpx;
  110. padding: 12rpx 18rpx;
  111. font-family: PingFangSC, PingFang SC;
  112. font-weight: 400;
  113. font-size: 24rpx;
  114. color: #70CF52;
  115. line-height: 24rpx;
  116. &.grey{
  117. background: #F0F2F8;
  118. color: #646464;
  119. }
  120. }
  121. }
  122. &-info{
  123. margin-top: 40rpx;
  124. &-left{
  125. width: 158rpx;
  126. height: 214rpx;
  127. image{
  128. width: 100%;
  129. height: 100%;
  130. }
  131. }
  132. &-right{
  133. width: calc(100% - 158rpx);
  134. padding-left: 20rpx;
  135. box-sizing: border-box;
  136. .title{
  137. font-family: PingFang-SC, PingFang-SC;
  138. font-weight: bold;
  139. font-size: 32rpx;
  140. color: #151B29;
  141. line-height: 40rpx;
  142. margin-bottom: 5rpx;
  143. }
  144. .tip{
  145. align-items: flex-start;
  146. margin-top: 25rpx;
  147. &-left{
  148. width: 160rpx;
  149. image{
  150. width: 24rpx;
  151. height: 24rpx;
  152. }
  153. text{
  154. font-family: PingFangSC, PingFang SC;
  155. font-weight: 400;
  156. font-size: 24rpx;
  157. color: #676775;
  158. line-height: 24rpx;
  159. margin-left: 10rpx;
  160. }
  161. }
  162. &-right{
  163. width: calc(100% - 160rpx);
  164. font-family: PingFangSC, PingFang SC;
  165. font-weight: 400;
  166. font-size: 24rpx;
  167. color: #676775;
  168. line-height: 24rpx;
  169. margin-left: 10rpx;
  170. }
  171. }
  172. .bottom{
  173. margin-top: 30rpx;
  174. display: flex;
  175. justify-content: flex-end;
  176. }
  177. .btn{
  178. background: #B7F358;
  179. border-radius: 27rpx;
  180. padding: 12rpx 26rpx;
  181. font-family: PingFang-SC, PingFang-SC;
  182. font-weight: bold;
  183. font-size: 24rpx;
  184. color: #252525;
  185. line-height: 30rpx;
  186. }
  187. }
  188. }
  189. }
  190. </style>