|
|
@@ -49,7 +49,8 @@ export function createRouterGuards(router: Router) {
|
|
|
try {
|
|
|
await setDynamicRoute(router);
|
|
|
} catch {
|
|
|
- next();
|
|
|
+ console.log('设置路由失败');
|
|
|
+ // next({ name: 'HomePage' });
|
|
|
}
|
|
|
}
|
|
|
next();
|
|
|
@@ -76,9 +77,7 @@ export function createRouterGuards(router: Router) {
|
|
|
}
|
|
|
// ElMessage.error('请先登录2');
|
|
|
userStore.showLogin = true;
|
|
|
- // next(redirectData);
|
|
|
- // window.location.href = getRedirectUrl();
|
|
|
- next();
|
|
|
+ next({ name: 'HomePage' });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -90,7 +89,7 @@ export function createRouterGuards(router: Router) {
|
|
|
await setDynamicRoute(router);
|
|
|
} catch (err) {
|
|
|
userStore.showLogin = true;
|
|
|
- next();
|
|
|
+ next({ name: 'HomePage' });
|
|
|
return;
|
|
|
}
|
|
|
NProgress.done();
|