Skip to content

Commit

Permalink
fix: fixed build warning for style of intro.js
Browse files Browse the repository at this point in the history
修复intro.js的样式文件造成的build警告

fixed: #1130
  • Loading branch information
mynetfan committed Aug 26, 2021
1 parent 30fa4cf commit d27633f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/router/guard/permissionGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,24 @@ export function createPermissionGuard(router: Router) {
return;
}

const token = userStore.getToken;

// Whitelist can be directly entered
if (whitePathList.includes(to.path as PageEnum)) {
if (to.path === LOGIN_PATH && token) {
const isSessionTimeout = userStore.getSessionTimeout;
try {
await userStore.afterLoginAction();
if (!isSessionTimeout) {
next((to.query?.redirect as string) || '/');
return;
}
} catch {}
}
next();
return;
}

const token = userStore.getToken;

// token does not exist
if (!token) {
// You can access without permission. You need to set the routing meta.ignoreAuth to true
Expand Down

0 comments on commit d27633f

Please sign in to comment.