From e952a75cb9512c6f09ee2f94e247aff17fe39302 Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Fri, 5 Jul 2024 15:17:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accountManagement/index.vue | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/systemManagement/accountManagement/index.vue b/src/views/systemManagement/accountManagement/index.vue index f0aadf9..d285494 100644 --- a/src/views/systemManagement/accountManagement/index.vue +++ b/src/views/systemManagement/accountManagement/index.vue @@ -225,15 +225,19 @@ const submitForm = (formEl: FormInstance | undefined) => { formEl.validate(valid => { if (valid) { // console.log(valid); - resetPW({ - id: passwordForm.id, - password: passwordForm.password - }).then(res => { - if (res.code === 200) { - message("重置成功", { type: "success" }); - dialogFormVisible.value = false; - } - }); + if (passwordForm.password !== passwordForm.confirmPassword) { + message("原密码要与新密码不一样!", { type: "error" }); + } else { + resetPW({ + id: passwordForm.id, + password: passwordForm.password + }).then(res => { + if (res.code === 200) { + message("重置成功", { type: "success" }); + dialogFormVisible.value = false; + } + }); + } } else { dialogFormVisible.value = false; console.log("error submit!");