From 94c09366bcef66c0f80925e6ec590b4c3e6521bc Mon Sep 17 00:00:00 2001 From: huxuejian Date: Thu, 12 Feb 2026 15:16:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/archive/edit-archive.vue | 15 ++++++++++----- pages/login/redirect-page.vue | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue index 136e4e1..0cb1707 100644 --- a/pages/archive/edit-archive.vue +++ b/pages/archive/edit-archive.vue @@ -64,14 +64,19 @@ function change({ title, value }) { if (title) { form.value[title] = value; } - if (title !== 'idCard') return; - const [isIdCard, birthday, gender] = validate.isChinaId(value); - if (isIdCard) { - form.value.birthday = birthday; - form.value.sex = gender == 'MALE' ? '男' : '女'; + if (title == 'idCard') { + const [isIdCard, birthday, gender] = validate.isChinaId(value); + if (isIdCard) { + form.value.birthday = birthday; + form.value.sex = gender == 'MALE' ? '男' : '女'; + const age = dayjs().diff(birthday, 'year'); + form.value.age = Math.max(1, age); + } + } else if (title === 'birthday' && formItems.value.some(i => i.title === 'age')) { const age = dayjs().diff(birthday, 'year'); form.value.age = Math.max(1, age); } + } function confirm() { diff --git a/pages/login/redirect-page.vue b/pages/login/redirect-page.vue index d889bd5..384a60b 100644 --- a/pages/login/redirect-page.vue +++ b/pages/login/redirect-page.vue @@ -61,6 +61,7 @@ async function bindTeam() { url: "/pages/home/home", }); } else { + set('home-invite-teamId', team.value.teamId); uni.redirectTo({ url: `/pages/archive/edit-archive?teamId=${team.value.teamId}&corpId=${team.value.corpId}` })