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) {
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() {

View File

@ -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}`
})