feat(api): 重构 API 调用并优化用户认证流程
- 新增 auth、forum 和 user API 文件夹,重新组织 API 调用结构
- 重构 AuthContext,使用新 API 进行用户认证和信息管理
- 更新 AdminPanel、ForumPage 等组件,使用新的 API 调用
- 删除旧的 authApi.js 文件,清理冗余代码
- 优化用户登录、注册和登出流程,改进错误处理和用户提示
Change-Id: If664193e1bf30036c197f164edc5b10df75f1331
diff --git a/src/routes/index.jsx b/src/routes/index.jsx
index e085801..f4b7942 100644
--- a/src/routes/index.jsx
+++ b/src/routes/index.jsx
@@ -14,6 +14,7 @@
// 导入新创建的页面组件
import HomePage from '../features/home/pages/HomePage';
import ForumPage from '../features/forum/pages/ForumPage';
+import PostDetailPage from '../features/forum/pages/PostDetailPage';
import PTPage from '../features/pt/pages/PTPage';
import TorrentListPage from '../features/torrents/pages/TorrentListPage';
import UploadTorrentPage from '../features/torrents/pages/UploadTorrentPage';
@@ -57,6 +58,17 @@
/>
<Route
+ path="/post/:postId"
+ element={
+ <ProtectedRoute>
+ <MainLayout>
+ <PostDetailPage />
+ </MainLayout>
+ </ProtectedRoute>
+ }
+ />
+
+ <Route
path="/pt"
element={
<ProtectedRoute>