From 5fee11323b82e1b68a9a35c5fab9e42a2e0dce24 Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Wed, 22 Mar 2023 20:01:39 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=BD=91=E7=BB=9C=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=20500=20=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/permission.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/router/permission.ts b/src/router/permission.ts index f8a3f3d..4637a87 100644 --- a/src/router/permission.ts +++ b/src/router/permission.ts @@ -9,7 +9,10 @@ export function setupPageGuard(router: Router) { const data = await authStore.getSession() if (String(data.auth) === 'false' && authStore.token) authStore.removeToken() - next() + if (to.path === '/500') + next({ name: 'Root' }) + else + next() } catch (error) { if (to.path !== '/500')