✨登录过期后跳转到过期前页面
This commit is contained in:
parent
e7fd1cfaa6
commit
761a75ed40
@ -64,8 +64,9 @@ service.interceptors.response.use(
|
||||
useUserStore()
|
||||
.logOut()
|
||||
.then(() => {
|
||||
var redirectUrl = window.location.pathname
|
||||
if (location.pathname.indexOf('/login') != 0) {
|
||||
location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index'
|
||||
location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index?redirect=' + redirectUrl
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user