分享
This commit is contained in:
@ -13,12 +13,16 @@ NProgress.configure({ showSpinner: false });
|
||||
const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*'];
|
||||
|
||||
const isWhiteList = (path: string) => {
|
||||
return whiteList.some(pattern => isPathMatch(pattern, path))
|
||||
}
|
||||
return whiteList.some((pattern) => isPathMatch(pattern, path));
|
||||
};
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
if (getToken()) {
|
||||
console.log(to);
|
||||
console.log(getToken());
|
||||
if (to.path == '/indexEquipment') {
|
||||
next();
|
||||
} else if (getToken()) {
|
||||
to.meta.title && useSettingsStore().setTitle(to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
|
Reference in New Issue
Block a user