fix: 问题修复

This commit is contained in:
huxuejian 2026-02-12 15:16:09 +08:00
parent dc7d1b082a
commit 94c09366bc
2 changed files with 11 additions and 5 deletions

View File

@ -64,14 +64,19 @@ function change({ title, value }) {
if (title) { if (title) {
form.value[title] = value; form.value[title] = value;
} }
if (title !== 'idCard') return; if (title == 'idCard') {
const [isIdCard, birthday, gender] = validate.isChinaId(value); const [isIdCard, birthday, gender] = validate.isChinaId(value);
if (isIdCard) { if (isIdCard) {
form.value.birthday = birthday; form.value.birthday = birthday;
form.value.sex = gender == 'MALE' ? '男' : '女'; 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'); const age = dayjs().diff(birthday, 'year');
form.value.age = Math.max(1, age); form.value.age = Math.max(1, age);
} }
} }
function confirm() { function confirm() {

View File

@ -61,6 +61,7 @@ async function bindTeam() {
url: "/pages/home/home", url: "/pages/home/home",
}); });
} else { } else {
set('home-invite-teamId', team.value.teamId);
uni.redirectTo({ uni.redirectTo({
url: `/pages/archive/edit-archive?teamId=${team.value.teamId}&corpId=${team.value.corpId}` url: `/pages/archive/edit-archive?teamId=${team.value.teamId}&corpId=${team.value.corpId}`
}) })