From e261d7a2d6cef4393383435c286e24a45007df4a Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 9 Apr 2023 00:39:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtoken=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=97=B6=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 46bf186ecc7088ce0c8643a26f95179c0a1162b8) --- src/config/axios/service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index d37dfb06..1a4741b6 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -230,7 +230,8 @@ const handleAuthorized = () => { wsCache.clear() removeToken() isRelogin.show = false - window.location.href = '/login?redirect=/sso?' + window.location.href.split('?')[1] + // 干掉token后再走一次路由让它过router.beforeEach的校验 + window.location.href = window.location.href }) } return Promise.reject(t('sys.api.timeoutMessage'))