From d7db3c234fb17a13069f9b03dc9f8ed4095a61b9 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 21 Jul 2023 13:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); + } + } }