feat: 1. 数脉api鉴别身份证。 2. 后台+微信登陆优化

This commit is contained in:
李琦
2026-08-04 13:56:14 +08:00
parent effaee6229
commit fe841e772a
5 changed files with 86 additions and 49 deletions

View File

@@ -169,12 +169,17 @@ export default {
uni.showLoading({ title: '正在获取验证码' });
sendDoctorWxCode(this.form.mobile, this.form.password)
.then((res) => {
if (res.code === 0) {
this.$refs.uCode.start();
if (res.result && res.result.code) {
this.smsCode = res.result.code;
}
// HTTP 200 但业务 code 非 0 时 reject统一走 catch 弹 toast
if (res.code !== 0) {
return Promise.reject(new Error(res.message || res.msg || '获取验证码失败'));
}
this.$refs.uCode.start();
if (res.result && res.result.code) {
this.smsCode = res.result.code;
}
})
.catch((err) => {
this.$toast(err.message || err.msg || '获取验证码失败');
})
.finally(() => {
uni.hideLoading();