Skip to content

Commit 46bf186

Browse files
author
puhui999
committed
修复token过期时路由跳转问题
1 parent 276e82c commit 46bf186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/config/axios/service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ const handleAuthorized = () => {
230230
wsCache.clear()
231231
removeToken()
232232
isRelogin.show = false
233-
window.location.href = '/login?redirect=/sso?' + window.location.href.split('?')[1]
233+
// 干掉token后再走一次路由让它过router.beforeEach的校验
234+
window.location.href = window.location.href
234235
})
235236
}
236237
return Promise.reject(t('sys.api.timeoutMessage'))

0 commit comments

Comments
 (0)