From 42e9eb8a1cdab9880ed381bbfc83cb0dfdbb9606 Mon Sep 17 00:00:00 2001 From: lipeng Date: Thu, 13 Jul 2023 10:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=80=E5=87=BA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/bg-menu.vue | 1 + src/request/http.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/components/bg-menu.vue b/src/components/bg-menu.vue index 9147242..4cd690f 100644 --- a/src/components/bg-menu.vue +++ b/src/components/bg-menu.vue @@ -210,6 +210,7 @@ export default { if (res.data.code == "200") { window.location.href = "/so/manage/ui/#/login"; this.$store.commit("setUserInfo", null); + this.$store.commit("setMenu", null); clearCookie("bgToken"); this.$message.success("退出成功"); resetRouter(); diff --git a/src/request/http.js b/src/request/http.js index 5be5a78..32ff985 100644 --- a/src/request/http.js +++ b/src/request/http.js @@ -28,6 +28,8 @@ const toLogin = () => { let path = router.currentRoute.value.path; //白名单中的401不做跳转 if (!store.state.whiteList.includes(path)) { + store.commit("setUserInfo", null); + store.commit("setMenu", null); window.location.href = `/so/manage/ui/#/login`; } // router.replace({ -- 2.26.0