index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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://oss.familydaf.cn/sxsnfile/20251218/2b822605d8d04cffb53b8521478ec2f9.png"></image>
  6. <view class="name">{{item?.memberName||''}}</view>
  7. <image class="sex" v-if="item?.gender==1" src="https://oss.familydaf.cn/sxsnfile/20251218/473d5677fbdb4106acdb9a163377d27f.png"></image>
  8. <image class="sex" v-else-if="item?.gender==0" src="https://oss.familydaf.cn/sxsnfile/20251218/02bc40a1c47b40f1a36b55cd0553211c.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://oss.familydaf.cn/sxsnfile/20251218/762878799914422d835e505291b9d4c6.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://oss.familydaf.cn/sxsnfile/20251218/57539643ab974aef9401d76818e1bf3b.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. border-radius: 16rpx;
  131. }
  132. }
  133. &-right{
  134. width: calc(100% - 158rpx);
  135. padding-left: 20rpx;
  136. box-sizing: border-box;
  137. .title{
  138. font-family: PingFang-SC, PingFang-SC;
  139. font-weight: bold;
  140. font-size: 32rpx;
  141. color: #151B29;
  142. line-height: 40rpx;
  143. margin-bottom: 5rpx;
  144. }
  145. .tip{
  146. align-items: flex-start;
  147. margin-top: 25rpx;
  148. &-left{
  149. width: 150rpx;
  150. image{
  151. width: 24rpx;
  152. height: 24rpx;
  153. }
  154. text{
  155. font-family: PingFangSC, PingFang SC;
  156. font-weight: 400;
  157. font-size: 24rpx;
  158. color: #676775;
  159. line-height: 24rpx;
  160. padding-left: 10rpx;
  161. box-sizing: border-box;
  162. }
  163. }
  164. &-right{
  165. width: calc(100% - 150rpx);
  166. font-family: PingFangSC, PingFang SC;
  167. font-weight: 400;
  168. font-size: 24rpx;
  169. color: #676775;
  170. line-height: 24rpx;
  171. }
  172. }
  173. .bottom{
  174. margin-top: 30rpx;
  175. display: flex;
  176. justify-content: flex-end;
  177. }
  178. .btn{
  179. background: #B7F358;
  180. border-radius: 27rpx;
  181. padding: 12rpx 26rpx;
  182. font-family: PingFang-SC, PingFang-SC;
  183. font-weight: bold;
  184. font-size: 24rpx;
  185. color: #252525;
  186. line-height: 30rpx;
  187. }
  188. }
  189. }
  190. }
  191. </style>