fix: 问题修复
This commit is contained in:
parent
dc7d1b082a
commit
94c09366bc
@ -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() {
|
||||||
|
|||||||
@ -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}`
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user