From e963a95ffc1c2fbb5c5d0b4efbee415f594f37ae Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 25 Oct 2023 11:10:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=9Eadmin=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E7=9B=B4=E6=8E=A5=E8=AE=BF?= =?UTF-8?q?=E9=97=AEurl=E6=96=B9=E5=BC=8F=E8=AE=BF=E9=97=AE=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=BE=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/permission.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index a6226384bf..550d8bf2a1 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -49,6 +49,11 @@ router.beforeEach(async (to, from, next) => { return pre }, {}) } + if (!pathValid(to.path) && to.path !== '/404' && !to.path.startsWith('/de-link')) { + const firstPath = getFirstAuthMenu() + next({ path: firstPath || '/404' }) + return + } next() return }