diff --git a/Web/src/layouts/components/Header.tsx b/Web/src/layouts/components/Header.tsx index 736179d..2da6e7c 100644 --- a/Web/src/layouts/components/Header.tsx +++ b/Web/src/layouts/components/Header.tsx @@ -77,7 +77,7 @@ const Header: React.FC = ({ const currentPath = location.pathname; const isAdminArea = routeInfo?.area === 'admin'; - const baseHref = isAdminArea ? '/admin' : '/'; + const baseHref = isAdminArea ? '/admin/dashboard' : '/'; const baseTitle = isAdminArea ? '管理后台' : '首页'; if (currentPath === baseHref && !explicitTitle && (!routeInfo || routeInfo.path === '')) { diff --git a/Web/src/routes/index.tsx b/Web/src/routes/index.tsx index 31af2db..5332615 100644 --- a/Web/src/routes/index.tsx +++ b/Web/src/routes/index.tsx @@ -127,7 +127,7 @@ const routes: RouteConfig[] = [ // 管理后台路由 { - path: '', + path: 'dashboard', key: 'admin-dashboard', icon: , label: '控制面板',