applyMemberVindicate.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="common_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header :title="title" bgColor="#FFFFFF"></cus-header>
  4. <div class="form">
  5. <div class="title">报名人员信息</div>
  6. <div class="pre adfac" style="margin-top: 40rpx;">
  7. <div class="pre-title"><span>*</span>人员类型</div>
  8. <div class="pre-content adfac">
  9. <div class="pre-content-box adfac" @tap="changeMember(1,'type')">
  10. <image v-if="memberInfo.type==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
  11. <image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
  12. <text>成人</text>
  13. </div>
  14. <div class="pre-content-box adfac" @tap="changeMember(2,'type')">
  15. <image v-if="memberInfo.type==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
  16. <image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
  17. <text>学生</text>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="pre adfac">
  22. <div class="pre-title"><span>*</span>姓名</div>
  23. <div class="pre-content">
  24. <up-input v-model="memberInfo.name" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入姓名"></up-input>
  25. </div>
  26. </div>
  27. <div class="pre adfac">
  28. <div class="pre-title"><span>*</span>身份证</div>
  29. <div class="pre-content">
  30. <up-input v-model="memberInfo.idcard" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></up-input>
  31. </div>
  32. </div>
  33. <div class="pre adfac">
  34. <div class="pre-title"><span style="color: #FFFFFF;">*</span>义工号</div>
  35. <div class="pre-content">
  36. <up-input v-model="memberInfo.workNo" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></up-input>
  37. </div>
  38. </div>
  39. <div class="pre adfac">
  40. <div class="pre-title"><span>*</span>性别</div>
  41. <div class="pre-content adfac">
  42. <div class="pre-content-box adfac" @tap="changeMember(1,'sex')">
  43. <image v-if="memberInfo.sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
  44. <image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
  45. <text>男</text>
  46. </div>
  47. <div class="pre-content-box adfac" @tap="changeMember(2,'sex')">
  48. <image v-if="memberInfo.sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
  49. <image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
  50. <text>女</text>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="pre adfac" v-if="memberInfo.type==2">
  55. <div class="pre-title"><span>*</span>就读学校</div>
  56. <div class="pre-content">
  57. <up-input v-model="memberInfo.school" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></up-input>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="btn" @tap="handleSave">保存</div>
  62. </view>
  63. </template>
  64. <script setup name="">
  65. import CusHeader from '@/components/CusHeader/index.vue'
  66. import { onLoad } from '@dcloudio/uni-app';
  67. import { ref, getCurrentInstance } from 'vue'
  68. const { proxy } = getCurrentInstance()
  69. const title = ref('添加报名人员')
  70. const memberInfo = ref({
  71. type:1,
  72. name:'',
  73. idcard:'',
  74. workNo:'',
  75. sex:1,
  76. school:''
  77. })
  78. const changeMember = (value,key) => {
  79. memberInfo.value[key] = value;
  80. }
  81. const handleSave = () => {
  82. if(!memberInfo.value.type) return proxy.$showToast('请选择人员类型')
  83. if(!memberInfo.value.name) return proxy.$showToast('请输入姓名')
  84. if(!proxy.$reg.idCard(memberInfo.value.idcard)) return proxy.$showToast('请输入正确的身份证号')
  85. if(!memberInfo.value.sex) return proxy.$showToast('请选择性别')
  86. if(!memberInfo.value.school&&memberInfo.value.type==2) return proxy.$showToast('请输入就读学校')
  87. console.log(memberInfo.value);
  88. }
  89. onLoad((options)=>{
  90. if (options.member) {
  91. try {
  92. const memberObject = JSON.parse(decodeURIComponent(options.member));
  93. console.log('成功解析的 member 对象:', memberObject);
  94. if(memberObject) title.value = '编辑报名人员';
  95. } catch (e) {
  96. console.error('解析 member 参数失败:', e);
  97. }
  98. } else {
  99. console.warn('未在URL中找到 member 参数');
  100. }
  101. })
  102. </script>
  103. <style scoped lang="scss">
  104. .common_page{
  105. padding-bottom: 184rpx;
  106. .form{
  107. background: #FFFFFF;
  108. border-radius: 24rpx;
  109. margin-top: 20rpx;
  110. padding: 36rpx 24rpx 0;
  111. .title{
  112. font-family: PingFang-SC, PingFang-SC;
  113. font-weight: bold;
  114. font-size: 36rpx;
  115. color: #151B29;
  116. line-height: 48rpx;
  117. }
  118. .pre{
  119. padding: 25rpx 0;
  120. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  121. &-title{
  122. width: 209rpx;
  123. font-family: PingFangSC, PingFang SC;
  124. font-weight: 400;
  125. font-size: 28rpx;
  126. color: #676775;
  127. line-height: 40rpx;
  128. label{
  129. font-family: PingFangSC, PingFang SC;
  130. font-weight: 400;
  131. font-size: 30rpx;
  132. color: #F4657A;
  133. line-height: 42rpx;
  134. margin-right: 4rpx;
  135. }
  136. }
  137. &-content{
  138. width: calc(100% - 209rpx);
  139. &-box{
  140. width: 184rpx;
  141. image{
  142. width: 28rpx;
  143. height: 28rpx;
  144. }
  145. text{
  146. font-family: PingFangSC, PingFang SC;
  147. font-weight: 400;
  148. font-size: 30rpx;
  149. color: #252525;
  150. line-height: 42rpx;
  151. margin-left: 16rpx;
  152. }
  153. }
  154. }
  155. }
  156. }
  157. .btn{
  158. width: calc(100% - 80rpx);
  159. height: 90rpx;
  160. background: #B7F358;
  161. border-radius: 45rpx;
  162. font-family: PingFang-SC, PingFang-SC;
  163. font-weight: bold;
  164. font-size: 32rpx;
  165. color: #151B29;
  166. line-height: 90rpx;
  167. text-align: center;
  168. letter-spacing: 2rpx;
  169. position: fixed;
  170. left: 40rpx;
  171. bottom: 64rpx;
  172. }
  173. }
  174. </style>