blob: 95e96536c18ccf0fcfca28137277987069c5a184 [file] [log] [blame]
Jiarenxiang38dcb052025-03-13 16:40:09 +08001/**
2 * @name umi 的路由配置
3 * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
4 * @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
5 * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
6 * @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
7 * @param redirect 配置路由跳转
8 * @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
9 * @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题
10 * @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
11 * @doc https://umijs.org/docs/guides/routes
12 */
13export default [
14 {
15 path: '/',
zhaoyumaof8f81842025-06-09 00:00:46 +080016 // redirect: '/home',
17 component: './Home/index.tsx',
Jiarenxiang38dcb052025-03-13 16:40:09 +080018 },
zhaoyumaof8f81842025-06-09 00:00:46 +080019 // {
20 // name: 'home',
21 // path: '/home',
22 // layout: false,
23 // component: './Home',
24 // },
Jiarenxiang38dcb052025-03-13 16:40:09 +080025 {
26 path: '*',
27 layout: false,
28 component: './404',
29 },
30 {
31 path: '/user',
32 layout: false,
33 routes: [
34 {
35 name: 'login',
36 path: '/user/login',
37 component: './User/Login',
38 },
39 ],
40 },
41 {
42 path: '/account',
43 routes: [
44 {
45 name: 'acenter',
46 path: '/account/center',
47 component: './User/Center',
48 },
49 {
50 name: 'asettings',
51 path: '/account/settings',
52 component: './User/Settings',
53 },
54 ],
55 },
56 {
57 name: 'system',
58 path: '/system',
59 routes: [
60 {
61 name: '字典数据',
62 path: '/system/dict-data/index/:id',
63 component: './System/DictData',
64 },
65 {
66 name: '分配用户',
67 path: '/system/role-auth/user/:id',
68 component: './System/Role/authUser',
69 },
70 ]
71 },
72 {
73 name: 'monitor',
74 path: '/monitor',
75 routes: [
76 {
77 name: '任务日志',
78 path: '/monitor/job-log/index/:id',
79 component: './Monitor/JobLog',
80 },
81 ]
82 },
83 {
84 name: 'tool',
85 path: '/tool',
86 routes: [
87 {
88 name: '导入表',
89 path: '/tool/gen/import',
90 component: './Tool/Gen/import',
91 },
92 {
93 name: '编辑表',
94 path: '/tool/gen/edit',
95 component: './Tool/Gen/edit',
96 },
97 ]
98 },
meisiyu1d4aade2025-06-02 20:10:36 +080099 {
崔向南464e19d2025-06-05 17:46:27 +0800100 path: '/bounty',
101 name: '悬赏管理',
102 icon: 'read',
103 routes: [
104 {
zhaoyumaof8f81842025-06-09 00:00:46 +0800105 name: '悬赏列表',
106 path: '/bounty',
崔向南464e19d2025-06-05 17:46:27 +0800107 component: '@/pages/Bounty/List',
108 },
109 {
zhaoyumaof8f81842025-06-09 00:00:46 +0800110 name: '悬赏详情',
崔向南464e19d2025-06-05 17:46:27 +0800111 path: '/bounty/detail/:id',
112 component: '@/pages/Bounty/Detail',
113 },
114 {
115 name: 'bountyPublish', // 发布悬赏页面名称
116 path: '/bounty/publish', // 访问路径
117 component: './Bounty/BountyPublish' // 对应页面文件路径(相对于 src/pages)
118 },
119 {
120 name: 'bountyReply', // 回复悬赏页面名称
121 path: '/bounty/reply', // 访问路径
122 component: './Bounty/BountyReply' // 对应页面文件路径
123 }
124
125 ],
126 },
127
128
129 {
meisiyu1d4aade2025-06-02 20:10:36 +0800130 name: '帖子中心',
131 icon: 'read',
zhaoyumaof8f81842025-06-09 00:00:46 +0800132 path: '/postCenter',
meisiyu1d4aade2025-06-02 20:10:36 +0800133 component: './PostCenter/index.tsx',
134 },
135 {
136 name: '帖子详情',
137 path: '/post-detail/:id',
138 component: './PostCenter/PostDetail.tsx',
139 hideInMenu: true,
140 },
141 {
142 name: '个人中心',
143 path: '/user-center',
144 component: './UserCenter/index.tsx',
145 hideInMenu: true,
146 },
147 {
148 name: '帖子审核',
149 path: '/post-review',
150 component: './PostReview/index.tsx',
151 hideInMenu: true,
Jiarenxiang36728482025-06-07 21:51:26 +0800152 },
153 {
154 name: '种子列表',
155 path: '/torrent-list',
156 component: './Torrent/torrentList.tsx',
157 hideInMenu: true,
158 },
Jiarenxiang56cbf662025-06-09 21:46:47 +0800159 {
160 name: '我的种子列表',
161 path: '/torrent-list-my',
162 component: './Torrent/torrentListMy.tsx',
163 hideInMenu: true,
164 },
Jiarenxiang36728482025-06-07 21:51:26 +0800165 {
166 name: '种子详情界面',
167 path: '/torrent-detail/:id',
168 component: './Torrent/torrentDetail.tsx',
169 hideInMenu: true,
170 },
171 {
172 name: '上传种子界面',
173 path: '/torrent-upload',
174 component: './Torrent/torrentUpload.tsx',
175 hideInMenu: true,
176 },
zhaoyumaof8f81842025-06-09 00:00:46 +0800177 {
178 name: '星球交流',
179 path: '/relation',
180 component: './Relation/index.tsx',
181 },
182
183 {
Jiarenxiang24d681b2025-06-08 19:27:05 +0800184 name: '审核种子界面',
185 path: '/torrent-audit-list',
186 component: './Torrent/torrentAuditList.tsx',
187 hideInMenu: true,
188 },
zhaoyumaof8f81842025-06-09 00:00:46 +0800189 {
Jiarenxiang24d681b2025-06-08 19:27:05 +0800190 name: '审核种子详情界面',
Jiarenxiang2e3c2672025-06-08 20:46:35 +0800191 path: '/torrent-audit/:id',
Jiarenxiang24d681b2025-06-08 19:27:05 +0800192 component: './Torrent/torrentAudit.tsx',
193 hideInMenu: true,
194 },
Jiarenxiang38dcb052025-03-13 16:40:09 +0800195];