From 203ed10aa393e23bc56ba82fec6337f77e559f2f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 21 Feb 2023 12:43:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=A7=BB=E5=8A=A8=E7=AB=AF):=20=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=88=A0=E9=99=A4=E7=BC=93=E5=AD=98=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=9C=AA=E7=BB=91=E5=AE=9A=E4=B9=9F=E8=83=BD=E4=BB=8E=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E8=BF=9B=E5=85=A5DE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/permission.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/permission.js b/frontend/src/permission.js index c612f949c9..96aa5902fd 100644 --- a/frontend/src/permission.js +++ b/frontend/src/permission.js @@ -57,7 +57,7 @@ const routeBefore = (callBack) => { callBack() } } -router.beforeEach(async(to, from, next) => routeBefore(() => { +router.beforeEach(async (to, from, next) => routeBefore(() => { // start progress bar NProgress.start() const mobileIgnores = ['/delink', '/de-auto-login'] @@ -69,6 +69,9 @@ router.beforeEach(async(to, from, next) => routeBefore(() => { if (hasToken) { urlSuffix += ('?detoken=' + hasToken) } + localStorage.removeItem('user-info') + localStorage.removeItem('userId') + localStorage.removeItem('Authorization') window.location.href = window.origin + urlSuffix NProgress.done() }