From 31f829c7547b68a04ba0b0f236a7d339b724bf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Fri, 27 Mar 2026 22:43:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=B7=AF=E7=94=B1=E6=94=B9=E4=B8=BA=E9=9D=99=E6=80=81?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=AA=8C=E8=AF=81=E5=8D=B3=E5=8F=AF=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/web-antd/src/router/routes/index.ts | 5 ++--- .../src/router/routes/modules/system.ts | 10 ---------- .../src/router/routes/static/profile.ts | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/router/routes/static/profile.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/router/routes/index.ts b/ecom-dmb-frontend/apps/web-antd/src/router/routes/index.ts index e6fb1440..bcece508 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/router/routes/index.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/router/routes/index.ts @@ -10,15 +10,14 @@ const dynamicRouteFiles = import.meta.glob('./modules/**/*.ts', { // 有需要可以自行打开注释,并创建文件夹 // const externalRouteFiles = import.meta.glob('./external/**/*.ts', { eager: true }); -// const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true }); +const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true }); /** 动态路由 */ const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles); /** 外部路由列表,访问这些页面可以不需要Layout,可能用于内嵌在别的系统(不会显示在菜单中) */ // const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles); -// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles); -const staticRoutes: RouteRecordRaw[] = []; +const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles); const externalRoutes: RouteRecordRaw[] = []; /** 路由列表,由基本路由、外部路由和404兜底路由组成 diff --git a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts index 885b332f..7825f622 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts @@ -19,16 +19,6 @@ const routes: RouteRecordRaw[] = [ title: '菜单管理', }, }, - { - name: 'PersonalProfile', - path: '/system/profile', - component: () => import('#/views/system/profile/index.vue'), - meta: { - icon: 'lucide:user', - title: '个人信息', - hideInMenu: true, - }, - }, ], }, ]; diff --git a/ecom-dmb-frontend/apps/web-antd/src/router/routes/static/profile.ts b/ecom-dmb-frontend/apps/web-antd/src/router/routes/static/profile.ts new file mode 100644 index 00000000..b8ef3574 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/router/routes/static/profile.ts @@ -0,0 +1,19 @@ +import type { RouteRecordRaw } from 'vue-router'; + +/** + * 静态路由 - 不需要权限验证的路由 + */ +const staticRoutes: RouteRecordRaw[] = [ + { + name: 'PersonalProfile', + path: '/system/profile', + component: () => import('#/views/system/profile/index.vue'), + meta: { + icon: 'lucide:user', + title: '个人信息', + hideInMenu: true, + }, + }, +]; + +export default staticRoutes;