二级路由登录

This commit is contained in:
wuhongjian 2022-11-22 10:45:32 +08:00
parent 8e53d92898
commit 4a6416de51
1 changed files with 2 additions and 0 deletions

View File

@ -161,9 +161,11 @@ instance.interceptors.response.use(
if (response.headers.redirect) {
if (response.headers.redirect === '/#/login') {
setAccessToken('')
window.location.replace('/ucs/#/login')
setTimeout(() => {
location.reload()
}, 1000)
return Promise.resolve()
}
window.location.replace(response.headers.redirect)
return Promise.resolve()