update:身份认证

This commit is contained in:
ltx 2026-04-13 18:10:43 +08:00
parent b3dc694db7
commit 325fbbc0cc

View File

@ -135,13 +135,16 @@ Page({
auth.fetchMyProfile().catch(() => ({}))
]).then(([res, profile]) => {
const d = res && typeof res === 'object' ? res : {};
if(d.birthDate ){
d.birthDate = d.birthDate.split(' ')[0] || d.birthday || '';
}
const name = d.name || d.realName || '';
const mobile = d.mobile || d.phone || '';
const idCardNumber = d.idCardNumber || d.idNumber || '';
const idCardImageUrl = d.idCardImageUrl || d.idCardFrontImageUrl || '';
const idCardBackImageUrl = d.idCardBackImageUrl || '';
const passportImageUrl = d.passportPhotoUrl || d.passportImageUrl || '';
const birthDate = d.birthDate.split(' ')[0] || d.birthday || '';
const birthDate = d.birthDate || d.birthday || '';
const rawGender = d.gender != null ? String(d.gender) : '';
const genderIndex = (rawGender === '1' || rawGender === 'F' || rawGender === '女') ? 1 : 0;
const ocrDone = Boolean(name || idCardNumber || passportImageUrl);
@ -289,7 +292,7 @@ Page({
const {
activeTab, idCardImageUrl, passportImageUrl,
name, idCardNumber, birthDate,
genderOptions, genderIndex, mobile, verificationCode
genderOptions, genderIndex, mobile, verificationCode,idCardBackImageUrl
} = this.data;
if (!name) {
@ -325,7 +328,8 @@ Page({
gender: genderValue,
birthDate: birthDate || undefined,
idCardNumber,
idCardImageUrl
idCardImageUrl,
idCardBackImageUrl
};
} else {
if (!passportImageUrl) {
@ -354,7 +358,8 @@ Page({
.submitMyAuth(payload)
.then(() => {
wx.showToast({ title: '提交成功', icon: 'success' });
setTimeout(() => wx.navigateBack({ delta: 1 }), 600);
this.loadAuth();
setTimeout(() => wx.navigateBack({ delta: 1 }), 1500);
})
.catch((err) => {
wx.showToast({ title: (err && err.message) || '提交失败', icon: 'none' });