|
|
@@ -22,7 +22,10 @@ import { ExclamationTriangleIcon, HomeIcon, BellIcon, UserIcon, AcademicCapIcon
|
|
|
import { NotificationsPage } from './pages_messages.tsx';
|
|
|
import { LivePage } from './pages_live.tsx';
|
|
|
import { RTCPage } from './pages_rtc.tsx';
|
|
|
-import { ClassroomPage } from './pages_classroom.tsx'
|
|
|
+import { ClassroomPage } from './pages_classroom.tsx';
|
|
|
+import ExamIndex from './components/Exam/ExamIndex.tsx';
|
|
|
+import ExamAdmin from './components/Exam/ExamAdmin.tsx';
|
|
|
+import ExamCard from './components/Exam/ExamCard.tsx';
|
|
|
|
|
|
// 设置中文语言
|
|
|
dayjs.locale('zh-cn');
|
|
|
@@ -212,7 +215,7 @@ const MobileLayout = () => {
|
|
|
{/* 底部导航栏 */}
|
|
|
<nav className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 shadow-lg">
|
|
|
<div className="flex justify-around">
|
|
|
- <Link
|
|
|
+ <Link
|
|
|
to="/mobile"
|
|
|
className={`flex flex-col items-center py-2 px-4 ${
|
|
|
location.pathname === '/mobile' ? 'text-blue-600' : 'text-gray-500'
|
|
|
@@ -221,7 +224,7 @@ const MobileLayout = () => {
|
|
|
<HomeIcon className="w-6 h-6 mb-1" />
|
|
|
<span className="text-xs">首页</span>
|
|
|
</Link>
|
|
|
- <Link
|
|
|
+ <Link
|
|
|
to="/mobile/notifications"
|
|
|
className={`flex flex-col items-center py-2 px-4 ${
|
|
|
location.pathname === '/mobile/notifications' ? 'text-blue-600' : 'text-gray-500'
|
|
|
@@ -239,6 +242,15 @@ const MobileLayout = () => {
|
|
|
<AcademicCapIcon className="w-6 h-6 mb-1" />
|
|
|
<span className="text-xs">课堂</span>
|
|
|
</Link>
|
|
|
+ <Link
|
|
|
+ to="/mobile/exam"
|
|
|
+ className={`flex flex-col items-center py-2 px-4 ${
|
|
|
+ location.pathname.startsWith('/mobile/exam') ? 'text-blue-600' : 'text-gray-500'
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ <AcademicCapIcon className="w-6 h-6 mb-1" />
|
|
|
+ <span className="text-xs">答题</span>
|
|
|
+ </Link>
|
|
|
<Link
|
|
|
to="/mobile/profile"
|
|
|
className={`flex flex-col items-center py-2 px-4 ${
|
|
|
@@ -268,6 +280,31 @@ const App = () => {
|
|
|
element: <ProtectedRoute><ClassroomPage /></ProtectedRoute>,
|
|
|
errorElement: <ErrorPage />
|
|
|
},
|
|
|
+ {
|
|
|
+ path: '/mobile/exam',
|
|
|
+ element: <ProtectedRoute><ExamIndex /></ProtectedRoute>,
|
|
|
+ errorElement: <ErrorPage />
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/mobile/exam/:id',
|
|
|
+ element: <ProtectedRoute><ExamAdmin /></ProtectedRoute>,
|
|
|
+ errorElement: <ErrorPage />
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/mobile/exam/card',
|
|
|
+ element: <ProtectedRoute><ExamCard /></ProtectedRoute>,
|
|
|
+ errorElement: <ErrorPage />
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/mobile/exam',
|
|
|
+ element: <ProtectedRoute><ExamIndex /></ProtectedRoute>,
|
|
|
+ errorElement: <ErrorPage />
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/mobile/exam/:id',
|
|
|
+ element: <ProtectedRoute><ExamAdmin /></ProtectedRoute>,
|
|
|
+ errorElement: <ErrorPage />
|
|
|
+ },
|
|
|
{
|
|
|
path: '/mobile/live',
|
|
|
element: <LivePage />,
|