|
|
@@ -33,10 +33,14 @@ router.beforeEach(async (to, from, next) => {
|
|
|
let path = store.state?.menuData[0]?.items[0].path;
|
|
|
if (0 === to.matched.length) {
|
|
|
next("/");
|
|
|
- } else if (to.path == "/login" || to.path == "/") {
|
|
|
+ } else if (to.path == "/login") {
|
|
|
next("/");
|
|
|
} else if (rolePermission?.indexOf(to.meta.code) == -1) {
|
|
|
- next("/");
|
|
|
+ if (to.path == "/") {
|
|
|
+ next();
|
|
|
+ } else {
|
|
|
+ next("/");
|
|
|
+ }
|
|
|
} else {
|
|
|
next();
|
|
|
}
|
|
|
@@ -44,7 +48,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (to.path == "/") {
|
|
|
next();
|
|
|
} else {
|
|
|
- next();
|
|
|
+ next("/");
|
|
|
}
|
|
|
}
|
|
|
} else {
|