From 6c6086a63d5a40fe11352adca32b99ecbda946da Mon Sep 17 00:00:00 2001 From: xiepeng Date: Thu, 23 May 2024 15:57:05 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BC=98=E5=8C=96=20=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user_practitioner/edit.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/enterprise_management/user_practitioner/edit.vue b/src/views/enterprise_management/user_practitioner/edit.vue index 198a93f..b93a064 100644 --- a/src/views/enterprise_management/user_practitioner/edit.vue +++ b/src/views/enterprise_management/user_practitioner/edit.vue @@ -741,14 +741,16 @@ const router = useRouter(); const { USER_ID } = route.query; const fnHasEmail = async (rule, value, callback) => { if (value) { - try { - await getVerifyDuplicateEmail({ - EMAIL: value, - PHONE: data.form.PHONE, - }); - callback(); - } catch { - callback(new Error("邮箱重复")); + const result = await getVerifyDuplicateEmail({ + EMAIL: value, + PHONE: data.form.PHONE + }); + if(USER_ID) { + if(result.pd) { + if(result.pd.EMAIL === value && result.pd.PHONE === data.form.PHONE) { + callback(); + }else callback(new Error("邮箱重复")) + }else callback(); } } else { callback();