diff --git a/src/router/index.js b/src/router/index.js index 7f3b374..8a66b41 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -90,7 +90,13 @@ router.beforeEach(async(to, from, next) => { const menuList= permissionStore.menuList; next({ path: menuList[0].children[0].path }); } else { - next(); + if(to.path=="/" || to.path=="/admin"){ + const menuList= permissionStore.menuList; + next({ path: menuList[0].children[0].path }); + }else{ + next(); + } + } }