|
|
|
|
@ -20,6 +20,8 @@ router.beforeEach(async (to, from, next) => {
|
|
|
|
|
if (to.path === '/login') {
|
|
|
|
|
next({ path: '/' });
|
|
|
|
|
NProgress.done();
|
|
|
|
|
} else if (whiteList.indexOf(to.path) !== -1) {
|
|
|
|
|
next()
|
|
|
|
|
} else {
|
|
|
|
|
if (useUserStore().roles.length === 0) {
|
|
|
|
|
isRelogin.show = true;
|
|
|
|
|
|