mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-21 03:44:21 +00:00
perf: 网络连接时 500 自动跳转到主页
This commit is contained in:
@@ -9,7 +9,10 @@ export function setupPageGuard(router: Router) {
|
|||||||
const data = await authStore.getSession()
|
const data = await authStore.getSession()
|
||||||
if (String(data.auth) === 'false' && authStore.token)
|
if (String(data.auth) === 'false' && authStore.token)
|
||||||
authStore.removeToken()
|
authStore.removeToken()
|
||||||
next()
|
if (to.path === '/500')
|
||||||
|
next({ name: 'Root' })
|
||||||
|
else
|
||||||
|
next()
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (to.path !== '/500')
|
if (to.path !== '/500')
|
||||||
|
Reference in New Issue
Block a user