diff --git a/src/client/admin/components/components_protected_route.tsx b/src/client/admin/components/ProtectedRoute.tsx
similarity index 100%
rename from src/client/admin/components/components_protected_route.tsx
rename to src/client/admin/components/ProtectedRoute.tsx
diff --git a/src/client/admin/index.tsx b/src/client/admin/index.tsx
index 3ce1ad4..af1dd7d 100644
--- a/src/client/admin/index.tsx
+++ b/src/client/admin/index.tsx
@@ -1,11 +1,42 @@
import { createRoot } from 'react-dom/client'
-import Web_app from './web_app'
+import { RouterProvider } from 'react-router';
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
+import { App as AntdApp } from 'antd'
+import dayjs from 'dayjs';
+import weekday from 'dayjs/plugin/weekday';
+import localeData from 'dayjs/plugin/localeData';
+import 'dayjs/locale/zh-cn';
+import { AuthProvider } from './hooks/AuthProvider';
+import { router } from './routes';
+
+// 配置 dayjs 插件
+dayjs.extend(weekday);
+dayjs.extend(localeData);
+
+// 设置 dayjs 语言
+dayjs.locale('zh-cn');
+
+// 创建QueryClient实例
+const queryClient = new QueryClient();
+
+// 应用入口组件
+const App = () => {
+ return (
+
+
+
+
+
+
+
+ )
+};
const rootElement = document.getElementById('root')
if (rootElement) {
const root = createRoot(rootElement)
root.render(
-
+
)
}
\ No newline at end of file
diff --git a/src/client/admin/layouts/MainLayout.tsx b/src/client/admin/layouts/MainLayout.tsx
index f761b94..a37a2b6 100644
--- a/src/client/admin/layouts/MainLayout.tsx
+++ b/src/client/admin/layouts/MainLayout.tsx
@@ -14,8 +14,8 @@ import {
UserOutlined
} from '@ant-design/icons';
import { useAuth } from '../hooks/AuthProvider';
-import { useTheme } from '../hooks/ThemeProvider';
import { useMenu, useMenuSearch, type MenuItem } from '../menu';
+import { getGlobalConfig } from '@/client/utils/utils';
const { Header, Sider, Content } = Layout;
@@ -25,7 +25,6 @@ const { Header, Sider, Content } = Layout;
*/
export const MainLayout = () => {
const { user } = useAuth();
- const { isDark } = useTheme();
const [showBackTop, setShowBackTop] = useState(false);
const location = useLocation();
@@ -105,7 +104,7 @@ export const MainLayout = () => {
// 应用名称 - 从CONFIG中获取或使用默认值
- const appName = window.CONFIG?.APP_NAME || '应用Starter';
+ const appName = getGlobalConfig('APP_NAME') || '应用Starter';
return (
@@ -145,7 +144,7 @@ export const MainLayout = () => {
{/* 菜单列表 */}