htc vor 4 Tagen
Ursprung
Commit
43216c6564

+ 3 - 1
pages/home.vue

@@ -100,7 +100,9 @@
 	}
 	
 	const getActivityList = (categoryId) => {
-		proxy.$api.get('/core/activity/page',{page:1,limit:2,categoryId}).then(({data:res})=>{
+		let userId = '';
+		if(uni.getStorageSync('userInfo')) userId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
+		proxy.$api.get('/core/activity/page',{page:1,limit:2,categoryId,userId}).then(({data:res})=>{
 			if(res.code!==0) return proxy.$showToast(res.msg)
 			activityList.value = res.data.list;
 			activityList.value.forEach(a=>{

+ 72 - 24
pagesHome/activityApply.vue

@@ -4,13 +4,13 @@
 		<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/19/54b75bc8-d926-449b-95a5-1126f700b481.png" class="top_bg_img" mode="widthFix"></image>
 		<div class="box box1">
 			<div class="box1-top">
-				<div class="title">{{'环保知识知多少?让孩子成为大自然的守护者!'}}</div>
-				<div class="tip">活动时间:{{'2025年06月01日 12:00'}}</div>
-				<div class="tip">活动地点:{{'深圳市南山区南山街道丰潭路'}}</div>
+				<div class="title">{{activity?.activityName||''}}</div>
+				<div class="tip">活动时间:{{activity?.activityStartTime||''}} 到 {{activity?.activityEndTime||''}}</div>
+				<div class="tip">活动地点:{{activity?.provinceName||''}}{{activity?.cityName||''}}{{activity?.address||''}}</div>
 			</div>
 			<div class="box1-bottom adfac">
 				<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/0f8ec76b-5c24-4d79-a77e-354d3e70bb36.png"></image>
-				<text>报名时间截止前可取消并返还爱心值,截止后不可取消。</text>
+				<text>报名时间截止前可取消并返还{{activityLimitCfg[activity?.activityLimit]}},截止后不可取消。</text>
 			</div>
 		</div>
 		<div class="box box2">
@@ -19,16 +19,16 @@
 				<div class="box2-members-pre adfacjb" v-for="(item,index) in selectMemberList" :key="index">
 					<div class="box2-members-pre-left">
 						<div class="ltop adfac">
-							<div class="name">{{'张琳琳'}}</div>
-							<image class="sex" v-if="item.sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
-							<image class="sex" v-else-if="item.sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
-							<div class="age" :class="{'women':item.sex==2,'man':item.sex==1}">{{46}}岁</div>
+							<div class="name">{{item.name}}</div>
+							<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>
+							<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>
+							<div class="age" :class="{'women':item.gender==1,'man':item.gender==0}">{{item.age}}岁</div>
 						</div>
 						<div class="lbottom">
-							身份证 {{'340123**********09'}}
+							身份证 {{item.idCardCopy}}
 						</div>
 					</div>
-					<div class="box2-members-pre-right">
+					<div class="box2-members-pre-right" @click="deleteMember(item,index)">
 						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/bf4876c8-43bf-4eeb-a153-1414e567ed10.png"></image>
 					</div>
 				</div>
@@ -42,13 +42,13 @@
 			<div class="box3-pre adfacjb">
 				<div class="box3-pre-left">联系人姓名</div>
 				<div class="box3-pre-right">
-					<up-input v-model="submitDto.name" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人姓名"></up-input>
+					<up-input v-model="submitDto.contact" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人姓名"></up-input>
 				</div>
 			</div>
 			<div class="box3-pre adfacjb">
 				<div class="box3-pre-left">联系人电话</div>
 				<div class="box3-pre-right">
-					<up-input v-model="submitDto.phone" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人电话"></up-input>
+					<up-input v-model="submitDto.contactPhone" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人电话"></up-input>
 				</div>
 			</div>
 		</div>
@@ -67,11 +67,16 @@
 			</div>
 			<div class="cbottom-btn adfacjb">
 				<div class="cbottom-btn-left adffcac">
-					<div class="heart adfac">
-						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/ab188fd0-afcc-4d76-a1d6-de367af3e756.png"></image>
-						<text>{{300}}</text>
-					</div>
-					<div class="text">爱心值</div>
+					<template v-if="activity?.activityLimit<3">
+						<div class="heart adfac">
+							<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/ab188fd0-afcc-4d76-a1d6-de367af3e756.png"></image>
+							<text>{{activity?.valueLimit||0}}</text>
+						</div>
+						<div class="text">{{activityLimitCfg[activity?.activityLimit]||''}}</div>
+					</template>
+					<template v-else>
+						<view class="free">免费</view>
+					</template>
 				</div>
 				<div class="cbottom-btn-right" @click="handleApply">确定报名</div>
 			</div>
@@ -81,18 +86,35 @@
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
-	import { ref } from 'vue'
+	import { ref, getCurrentInstance } from 'vue'
+	import { onLoad } from '@dcloudio/uni-app'
+	const { proxy } = getCurrentInstance()
 	
-	const selectMemberList = ref([{sex:1},{sex:2}])
+	const activity = ref(null)
+	const activityLimitCfg = ref({
+		1:'爱心值',
+		2:'专享券',
+		3:'免费'
+	})
+	const selectMemberList = ref([])
 	const submitDto = ref({
-		name:'',
-		phone:''
+		activityId:'',
+		contact:'',
+		contactPhone:'',
+		couponIds:[],
+		memberIds:[],
+		userId:''
 	})
 	const agree = ref(false)
 	
 	const handleAdd = () => {
 		uni.navigateTo({
-			url:'/pagesHome/applyMember'
+			url:'/pagesHome/applyMember',
+			events:{
+				'selectMembers': data => {
+					selectMemberList.value = data;
+				}
+			}
 		})
 	}
 	
@@ -103,14 +125,33 @@
 	}
 	
 	const handleApply = () => {
-		uni.navigateTo({
-			url:'/pagesHome/applyResult'
+		if(selectMemberList.value.length===0) return proxy.$showToast('请至少添加一位报名人员')
+		if(!submitDto.value.contact) return proxy.$showToast('请输入联系人姓名')
+		if(!proxy.$reg.mobile(submitDto.value.contactPhone)) return proxy.$showToast('请输入正确的联系电话')
+		if(!agree.value) return proxy.$showToast('请勾选已知晓并同意')
+		submitDto.value.memberIds = selectMemberList.value.map(m=>m.id);
+		submitDto.value.activityId = activity.value.id;
+		submitDto.value.userId = JSON.parse(uni.getStorageSync('userInfo')).id;
+		
+		proxy.$api.post('/core/activity/signup/signup',submitDto.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			uni.redirectTo({
+				url:'/pagesHome/applyResult'
+			})
 		})
 	}
 	
 	const changeAgree = () => {
 		agree.value = !agree.value;
 	}
+	
+	const deleteMember = (item,index) => {
+		selectMemberList.value.splice(index,1);
+	}
+	
+	onLoad(options=>{
+		activity.value = options.activity&&JSON.parse(decodeURIComponent(options.activity))
+	})
 </script>
 
 <style scoped lang="scss">
@@ -342,6 +383,13 @@
 						line-height: 24rpx;
 						margin-top: 11rpx;
 					}
+					.free{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 32rpx;
+						color: #252525;
+						line-height: 32rpx;
+					}
 				}
 				&-right{
 					width: 528rpx;

+ 2 - 1
pagesHome/activityDetail.vue

@@ -245,7 +245,8 @@
 		let { loveValue, ticketValue } = await getUserLoveValue();
 		// url:'/pagesHome/signSuccess'
 		// url:'/pagesHome/fillNonprofitArchives'
-		let url = '/pagesHome/activityApply';
+		let url = `/pagesHome/activityApply?activity=${encodeURIComponent(JSON.stringify(activityInfo.value))}`;
+		
 		if((activityInfo.value?.activityLimit==1&&loveValue<activityInfo?.value.valueLimit)
 		||(activityInfo.value?.activityLimit==2&&ticketValue<activityInfo?.value.valueLimit)){
 			fail.value = true;

+ 4 - 0
pagesHome/allActivity.vue

@@ -92,6 +92,7 @@
 	const queryParams = ref({
 		page:1,
 		limit:10,
+		userId:'',
 		activityName:'',
 		categoryId:'',
 		districtId:''
@@ -231,6 +232,9 @@
 	}
 	
 	onMounted(()=>{
+		if(uni.getStorageSync('userInfo')){
+			queryParams.value.userId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
+		}
 		getTypeList()
 		getActivityList()
 		nextTick(()=>{

+ 101 - 33
pagesHome/applyMember.vue

@@ -1,54 +1,105 @@
 <template>
 	<view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
 		<cus-header title="报名信息" bgColor="#FFFFFF"></cus-header>
-		<div class="add">
-			<div class="btn adfacjc" @tap="handleAdd">
+		<view class="add">
+			<view class="btn adfacjc" @click="handleAdd">
 				<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/af9133fd-e15e-454d-9152-e4629fd0ce28.png"></image>
 				<text>添加</text>
-			</div>
-		</div>
+			</view>
+		</view>
 		<template v-if="list.length">
-			<div class="list">
+			<view class="list">
 				<up-list @scrolltolower="scrolltolower" style="height: 100%;">
 					<up-list-item v-for="(item, index) in list" :key="index">
-						<div class="box adfacjb">
-							<div class="box-left adfac" @tap="handleEdit(item,index)">
-								<div class="box-left-edit">
+						<view class="box adfacjb">
+							<view class="box-left adfac" @click="handleEdit(item,index)">
+								<view class="box-left-edit">
 									<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/7799f9f2-1dca-4af3-980b-7f6def10e22f.png"></image>
-								</div>
-								<div class="box-left-info">
-									<div class="box-left-info-top adfac">
-										<div class="name">{{'张琳琳'}}</div>
-										<image class="sex" v-if="item.sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
-										<image class="sex" v-else-if="item.sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
-										<div class="age" :class="{'women':item.sex==2,'man':item.sex==1}">{{46}}岁</div>
-									</div>
-									<div class="box-left-info-bottom">
-										身份证 {{'340123**********09'}}
-									</div>
-								</div>
-							</div>
-							<div class="box-right" @tap="handleSelect(item,index)">
+								</view>
+								<view class="box-left-info">
+									<view class="box-left-info-top adfac">
+										<view class="name">{{item.name||''}}</view>
+										<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>
+										<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>
+										<view class="age" :class="{'women':item.gender==1,'man':item.gender==0}">{{age}}岁</view>
+									</view>
+									<view class="box-left-info-bottom">
+										身份证 {{item.idCardCopy}}
+									</view>
+								</view>
+							</view>
+							<view class="box-right" @click="handleSelect(item,index)">
 								<image v-if="item.select" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/87b5b244-d14f-43cd-991b-4ac9f48d909e.png"></image>
 								<image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b8a5cabd-57f8-4ad7-9677-f6372423c50a.png"></image>
-							</div>
-						</div>
+							</view>
+						</view>
 					</up-list-item>
 				</up-list>
-			</div>
-			<div class="confirm">确定,已选择{{2}}人</div>
-		</template>
-		<template v-else>
-			<div class="empty">暂无可选人员,请添加</div>
+			</view>
+			<view class="confirm" @click="confirmSelect">确定,已选择{{selectNum}}人</view>
 		</template>
+		<view class="dataEmpty" v-else>
+			<page-empty text="暂无可选成员,请添加"></page-empty>
+		</view>
 	</view>
 </template>
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
-	import { ref } from 'vue'
+	import PageEmpty from '@/components/pageEmpty/index.vue'
+	import { ref, onMounted, getCurrentInstance } from 'vue'
+	const { proxy } = getCurrentInstance()
+	
+	const queryParams = ref({
+		page:1,
+		limit:-1,
+		userId:''
+	})
+	const list = ref([])
+	const selectNum = ref(0)
+	
+	const getMemberList = () => {
+		proxy.$api.get('/core/family/member/page',queryParams.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			list.value = [...list.value,...res.data.list]
+			list.value.forEach(l=>{
+				l.age = getAge(l.idCard)
+				l.select = false;
+				l.idCardCopy = l.idCard.replace(/^(\d{6})(\d{8})(\d{3}[\dX])$/i,'$1********$3')
+			})
+		})
+	}
 	
-	const list = ref([{sex:1},{sex:2},{sex:2}])
+	const isValid = (idCard) => {
+		// 正则表达式校验18位身份证号码(最后一位可以是数字或X/x)
+		const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+		return typeof idCard === 'string' && regex.test(idCard);
+	  }
+	
+	const getAge = (idCard) => {
+		if (!isValid(idCard)) return 0
+	
+		// 从身份证的第7位开始,截取8位作为出生日期字符串 (YYYYMMDD)
+		const birthDateStr = idCard.substring(6, 14);
+		const birthYear = parseInt(birthDateStr.substring(0, 4), 10);
+		const birthMonth = parseInt(birthDateStr.substring(4, 6), 10);
+		const birthDay = parseInt(birthDateStr.substring(6, 8), 10);
+	
+		const today = new Date();
+		const currentYear = today.getFullYear();
+		const currentMonth = today.getMonth() + 1; // getMonth() 返回 0-11
+		const currentDay = today.getDate();
+	
+		// 计算周岁
+		let age = currentYear - birthYear;
+	
+		// 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
+		if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+		  age--;
+		}
+	
+		return age < 0 ? 0 : age; 
+	}
 	
 	const handleAdd = () => {
 		uni.navigateTo({
@@ -58,12 +109,29 @@
 	
 	const handleEdit = (item,index) => {
 		uni.navigateTo({
-			url:'/pagesHome/applyMemberVindicate?member='+encodeURIComponent(JSON.stringify(item))
+			url:'/pagesHome/applyMemberVindicate?id='+item.id
 		})
 	}
+	
 	const handleSelect = (item,index) => {
-		
+		list.value[index].select = !list.value[index].select;
+		selectNum.value = list.value.filter(l=>l.select).length;
 	}
+	
+	const confirmSelect = () => {
+		if(list.value.filter(l=>l.select).length===0) return proxy.$showToast('请至少选择一位人员')
+		let selectList = list.value.filter(l=>l.select);
+		proxy.getOpenerEventChannel().emit('selectMembers',selectList);
+		uni.navigateBack();
+	}
+	
+	onMounted(()=>{
+		try{
+			queryParams.value.userId = JSON.parse(uni.getStorageSync('userInfo')).id;
+			getMemberList()
+		}catch(e){
+		}
+	})
 </script>
 
 <style scoped lang="scss">

+ 42 - 32
pagesHome/applyMemberVindicate.vue

@@ -6,13 +6,13 @@
 			<div class="pre adfac" style="margin-top: 40rpx;">
 				<div class="pre-title"><span>*</span>人员类型</div>
 				<div class="pre-content adfac">
-					<div class="pre-content-box adfac" @tap="changeMember(1,'type')">
-						<image v-if="memberInfo.type==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
+					<div class="pre-content-box adfac" @tap="changeMember(1,'personnelType')">
+						<image v-if="memberInfo.personnelType==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
 						<image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
 						<text>成人</text>
 					</div>
-					<div class="pre-content-box adfac" @tap="changeMember(2,'type')">
-						<image v-if="memberInfo.type==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
+					<div class="pre-content-box adfac" @tap="changeMember(2,'personnelType')">
+						<image v-if="memberInfo.personnelType==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
 						<image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
 						<text>学生</text>
 					</div>
@@ -27,34 +27,34 @@
 			<div class="pre adfac">
 				<div class="pre-title"><span>*</span>身份证</div>
 				<div class="pre-content">
-					<up-input v-model="memberInfo.idcard" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></up-input>
+					<up-input v-model="memberInfo.idCard" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></up-input>
 				</div>
 			</div>
 			<div class="pre adfac">
 				<div class="pre-title"><span style="color: #FFFFFF;">*</span>义工号</div>
 				<div class="pre-content">
-					<up-input v-model="memberInfo.workNo" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></up-input>
+					<up-input v-model="memberInfo.volunteerNo" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></up-input>
 				</div>
 			</div>
 			<div class="pre adfac">
 				<div class="pre-title"><span>*</span>性别</div>
 				<div class="pre-content adfac">
-					<div class="pre-content-box adfac" @tap="changeMember(1,'sex')">
-						<image v-if="memberInfo.sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
+					<div class="pre-content-box adfac" @tap="changeMember(0,'gender')">
+						<image v-if="memberInfo.gender==0" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
 						<image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
 						<text>男</text>
 					</div>
-					<div class="pre-content-box adfac" @tap="changeMember(2,'sex')">
-						<image v-if="memberInfo.sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
+					<div class="pre-content-box adfac" @tap="changeMember(1,'gender')">
+						<image v-if="memberInfo.gender==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/9efae012-a9fd-4a0d-9e14-7ec90001e712.png"></image>
 						<image v-else src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/5ae64305-d1e0-4ffe-8dc0-f9d3704ac370.png"></image>
 						<text>女</text>
 					</div>
 				</div>
 			</div>
-			<div class="pre adfac" v-if="memberInfo.type==2">
+			<div class="pre adfac" v-if="memberInfo.personnelType==2">
 				<div class="pre-title"><span>*</span>就读学校</div>
 				<div class="pre-content">
-					<up-input v-model="memberInfo.school" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></up-input>
+					<up-input v-model="memberInfo.currentSchool" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></up-input>
 				</div>
 			</div>
 		</div>
@@ -70,12 +70,13 @@
 	
 	const title = ref('添加报名人员')
 	const memberInfo = ref({
-		type:1,
+		userId:'',
+		personnelType:1,
 		name:'',
-		idcard:'',
-		workNo:'',
-		sex:1,
-		school:''
+		idCard:'',
+		volunteerNo:'',
+		gender:0,
+		currentSchool:''
 	})
 	
 	const changeMember = (value,key) => {
@@ -83,25 +84,34 @@
 	}
 	
 	const handleSave = () => {
-		if(!memberInfo.value.type) return proxy.$showToast('请选择人员类型')
 		if(!memberInfo.value.name) return proxy.$showToast('请输入姓名')
-		if(!proxy.$reg.idCard(memberInfo.value.idcard)) return proxy.$showToast('请输入正确的身份证号')
-		if(!memberInfo.value.sex) return proxy.$showToast('请选择性别')
-		if(!memberInfo.value.school&&memberInfo.value.type==2) return proxy.$showToast('请输入就读学校')
-		console.log(memberInfo.value);
+		if(!proxy.$reg.idCard(memberInfo.value.idCard)) return proxy.$showToast('请输入正确的身份证号')
+		if(!memberInfo.value.currentSchool&&memberInfo.value.personnelType==2) return proxy.$showToast('请输入就读学校')
+		memberInfo.value.gender = memberInfo.value.gender??1;
+		if(!memberInfo.value.userId) memberInfo.value.userId = JSON.parse(uni.getStorageSync('userInfo')).id;
+		proxy.$api[memberInfo.value.id?'put':'post']('/core/family/member',memberInfo.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			proxy.$showToast(memberInfo.value.id?'编辑成功':'添加成功')
+			setTimeout(()=>{
+				uni.redirectTo({
+					url:'/pagesHome/applyMember'
+				})
+			},1500)
+		})
+	}
+	
+	const getMemberInfo = (id) => {
+		proxy.$api.get(`/core/family/member/${id}`).then(({data:res})=>{
+			if(res.code!==0) return this.$showToast(res.msg)
+			memberInfo.value = {...memberInfo.value,...res.data}
+		})
 	}
 	
 	onLoad((options)=>{
-		if (options.member) {
-			try {
-				const memberObject = JSON.parse(decodeURIComponent(options.member));
-				console.log('成功解析的 member 对象:', memberObject);
-				if(memberObject) title.value = '编辑报名人员';
-			} catch (e) {
-				console.error('解析 member 参数失败:', e);
-			}
-		} else {
-			console.warn('未在URL中找到 member 参数');
+		const id = options?.id;
+		if(id){
+			title.value = '编辑报名人员';
+			getMemberInfo(id)
 		}
 	})
 </script>

+ 1 - 1
pagesMy/familyMember.vue

@@ -18,7 +18,7 @@
 								</view>
 								<view class="box-left-info">
 									<view class="box-left-info-top adfac">
-										<view class="name">{{item.name}}</view>
+										<view class="name">{{item.name||''}}</view>
 										<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>
 										<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>
 										<view class="age" :class="{'women':item.gender==1,'man':item.gender==0}">{{item.age}}岁</view>

+ 1 - 0
pagesMy/familyMemberVindicate.vue

@@ -110,6 +110,7 @@
 	onLoad((options)=>{
 		const id = options?.id;
 		if(id){
+			title.value = '编辑家庭成员';
 			getMemberInfo(id)
 		}
 	})