From 9021e992ad1b1b10dfe5e277f0a09789433801cb Mon Sep 17 00:00:00 2001 From: Li Kui <90845831+likui628@users.noreply.github.com> Date: Tue, 16 Jul 2024 07:59:58 +0800 Subject: [PATCH] fix: resolve redirect not found issue and remove /demos prefix - Resolved the issue where redirects were not found in the router - Standardized the removal of the /demos prefix from routes --- apps/backend-mock/src/modules/menu/menu.controller.ts | 6 +++--- apps/web-antd/src/router/routes/modules/demos.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/backend-mock/src/modules/menu/menu.controller.ts b/apps/backend-mock/src/modules/menu/menu.controller.ts index a8155365..d2552332 100644 --- a/apps/backend-mock/src/modules/menu/menu.controller.ts +++ b/apps/backend-mock/src/modules/menu/menu.controller.ts @@ -89,16 +89,16 @@ export class MenuController { }, name: 'Demos', path: '/demos', - redirect: '/demos/access', + redirect: '/access', children: [ { name: 'Access', - path: 'access', + path: '/access', meta: { icon: 'mdi:cloud-key-outline', title: 'page.demos.access.backendPermissions', }, - redirect: '/demos/access/page-control', + redirect: '/access/page-control', children: [ { name: 'AccessPageControl', diff --git a/apps/web-antd/src/router/routes/modules/demos.ts b/apps/web-antd/src/router/routes/modules/demos.ts index 1d8bd9eb..a130c51e 100644 --- a/apps/web-antd/src/router/routes/modules/demos.ts +++ b/apps/web-antd/src/router/routes/modules/demos.ts @@ -14,7 +14,7 @@ const routes: RouteRecordRaw[] = [ }, name: 'Demos', path: '/demos', - redirect: '/demos/access', + redirect: '/access', children: [ { meta: { @@ -22,8 +22,8 @@ const routes: RouteRecordRaw[] = [ title: $t('page.demos.access.frontendPermissions'), }, name: 'Access', - path: 'access', - redirect: '/demos/access', + path: '/access', + redirect: '/access/page-control', children: [ { name: 'AccessPageControl', @@ -258,8 +258,8 @@ const routes: RouteRecordRaw[] = [ title: $t('page.demos.nested.title'), }, name: 'Nested', - path: 'nested', - redirect: '/demos/nested/menu1', + path: '/nested', + redirect: '/nested/menu1', children: [ { name: 'Menu1',