perf: 网络连接时 500 自动跳转到主页
This commit is contained in:
parent
814c3a2565
commit
5fee11323b
|
@ -9,6 +9,9 @@ export function setupPageGuard(router: Router) {
|
|||
const data = await authStore.getSession()
|
||||
if (String(data.auth) === 'false' && authStore.token)
|
||||
authStore.removeToken()
|
||||
if (to.path === '/500')
|
||||
next({ name: 'Root' })
|
||||
else
|
||||
next()
|
||||
}
|
||||
catch (error) {
|
||||
|
|
Loading…
Reference in New Issue