From 6390fa18f5c2df1158a0d664786797b0e8b2fbf9 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期三, 15 十月 2025 13:10:16 +0800
Subject: [PATCH] 提交

---
 src/views/system/user/profile/resetPwd.vue |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/views/system/user/profile/resetPwd.vue b/src/views/system/user/profile/resetPwd.vue
index dec2d79..4c5d701 100644
--- a/src/views/system/user/profile/resetPwd.vue
+++ b/src/views/system/user/profile/resetPwd.vue
@@ -18,7 +18,8 @@
 
 <script setup>
 import { updateUserPwd } from "@/api/system/user";
-
+import useUserStore from "@/store/modules/user";
+const userStore = useUserStore()
 const { proxy } = getCurrentInstance();
 
 const user = reactive({
@@ -45,7 +46,14 @@
   proxy.$refs.pwdRef.validate(valid => {
     if (valid) {
       updateUserPwd(user.oldPassword, user.newPassword).then(response => {
-        proxy.$modal.msgSuccess("修改成功");
+        if(response.code == 200){
+          proxy.$modal.msgSuccess("密码修改成功,需重新登录");
+          setTimeout(()=>{
+            userStore.logOut().then(() => {
+              location.href = '/index';
+            })
+          },2000)
+        }
       });
     }
   });

--
Gitblit v1.9.2