fix: fixed build warning for style of intro.js

修复intro.js的样式文件造成的build警告

fixed: #1130
This commit is contained in:
无木 2021-08-26 20:50:25 +08:00
parent 30fa4cfa2a
commit d27633fb31

View File

@ -29,14 +29,24 @@ export function createPermissionGuard(router: Router) {
return; return;
} }
const token = userStore.getToken;
// Whitelist can be directly entered // Whitelist can be directly entered
if (whitePathList.includes(to.path as PageEnum)) { 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(); next();
return; return;
} }
const token = userStore.getToken;
// token does not exist // token does not exist
if (!token) { if (!token) {
// You can access without permission. You need to set the routing meta.ignoreAuth to true // You can access without permission. You need to set the routing meta.ignoreAuth to true