From 6f779f19a3c4c47053beb1b30958935cb0ec5969 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Mar 2025 15:37:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=90=8E=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/NavBar/components/UserProfile.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/layout/components/NavBar/components/UserProfile.vue b/src/layout/components/NavBar/components/UserProfile.vue index 4d8c80b..55a2eef 100644 --- a/src/layout/components/NavBar/components/UserProfile.vue +++ b/src/layout/components/NavBar/components/UserProfile.vue @@ -140,7 +140,14 @@ function submitHandle() { password: form.newPass, }); ElNotification.success("修改成功,请重新登陆"); - logout(); + userStore + .logout() + .then(() => { + tagsViewStore.delAllViews(); + }) + .then(() => { + router.push(`/login?redirect=${route.fullPath}`); + }); } catch (error) { formLoading.value = false; console.log(error);