import { Routes, Route, Navigate } from 'react-router-dom'; import { AppLayout } from '@/components/Layout'; import { Dashboard, UserList, CallList } from '@/pages'; import { useAuth } from '@/store'; // 导入移动端页面 - 使用Web版本 import HomeScreen from '@/screens/HomeScreen.web'; import CallScreen from '@/screens/CallScreen.web'; import DocumentScreen from '@/screens/DocumentScreen.web'; import AppointmentScreen from '@/screens/AppointmentScreen.web'; import SettingsScreen from '@/screens/SettingsScreen.web'; import MobileNavigation from '@/components/MobileNavigation.web'; // 私有路由组件 const PrivateRoute = ({ children }: { children: React.ReactNode }) => { const { isAuthenticated } = useAuth(); return isAuthenticated ? <>{children} : ; }; // 公共路由组件 const PublicRoute = ({ children }: { children: React.ReactNode }) => { const { isAuthenticated } = useAuth(); return !isAuthenticated ? <>{children} : ; }; // 登录页面(临时占位符) const LoginPage = () => (
登录页面 - 待实现
); // 404页面 const NotFoundPage = () => (

404

页面不存在

); // 移动端布局组件 const MobileLayout = ({ children }: { children: React.ReactNode }) => (
{children}
); const AppRoutes = () => { return ( {/* 公共路由 */} } /> {/* 移动端路由 */} } /> } /> } /> } /> } /> } /> } /> } /> {/* 私有路由 - Web管理后台 */} {/* 默认重定向到仪表板 */} } /> {/* 仪表板 */} } /> {/* 用户管理 */} } /> {/* 通话记录 */} } /> {/* 文档管理 - 待实现 */} 文档管理页面 - 待实现 } /> {/* 预约管理 - 待实现 */} 预约管理页面 - 待实现 } /> {/* 译员管理 - 待实现 */} 译员管理页面 - 待实现 } /> {/* 财务管理 - 待实现 */} 财务管理页面 - 待实现 } /> {/* 系统设置 - 待实现 */} 系统设置页面 - 待实现 } /> {/* 404页面 */} } /> } /> ); }; export default AppRoutes;