From 03ef0561f6907b4bf9017ea81bd6e8e324d69421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Mon, 21 Mar 2022 23:57:24 +0800 Subject: [PATCH] =?UTF-8?q?style(permission.ts):=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/permission.ts b/src/permission.ts index de8d9038..b575b3b1 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -14,7 +14,7 @@ router.beforeEach(async (to, form, next) => { const { user, permission } = useStore() const hasToken = user.token if (hasToken) { - // 如果登录成功,跳转到首页 + // 登录成功,跳转到首页 if (to.path === '/login') { next({ path: '/' }) NProgress.done() @@ -41,7 +41,7 @@ router.beforeEach(async (to, form, next) => { } } } else { - /* has no token*/ + // 无 token if (whiteList.indexOf(to.path) !== -1) { next() } else {