style(permission.ts): 注释完善

This commit is contained in:
郝先瑞
2022-03-21 23:57:24 +08:00
parent 587acaaea4
commit 03ef0561f6

View File

@@ -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 {