| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import { Routes } from '@angular/router';
- /**
- * 移动端路由树(ADR-004:双端双套)
- *
- * ⚠️ 会话详情与数字生命详情在 **shell 外**(全屏路由)——
- * 若放进 shell 子路由并用 `**` 兜底,会吞掉全屏路由
- * (存量为此踩过坑,此处刻意规避)。
- */
- export const mobileRoutes: Routes = [
- // ---- 全屏路由(不带底部 TabBar)----
- {
- path: 'chat/:id',
- loadComponent: () => import('./pages/chat/chat').then((m) => m.MbChatPage),
- },
- {
- path: 'agent/:id',
- loadComponent: () => import('./pages/agent/agent').then((m) => m.MbAgentPage),
- },
- {
- path: 'tasks/:id',
- loadComponent: () => import('./pages/tasks/task-detail').then((m) => m.MbTaskDetailPage),
- },
- {
- path: 'tasks',
- loadComponent: () => import('./pages/tasks/tasks').then((m) => m.MbTasksPage),
- },
- // ---- 带 TabBar 的常规页面 ----
- {
- path: '',
- loadComponent: () => import('./shell/mobile-shell').then((m) => m.MobileShellComponent),
- children: [
- { path: '', pathMatch: 'full', redirectTo: 'home' },
- {
- path: 'home',
- loadComponent: () => import('./pages/home/home').then((m) => m.MbHomePage),
- },
- {
- path: 'messages',
- loadComponent: () => import('./pages/messages/messages').then((m) => m.MbMessagesPage),
- },
- {
- path: 'contacts',
- loadComponent: () => import('./pages/contacts/contacts').then((m) => m.MbContactsPage),
- },
- {
- path: 'projects',
- loadComponent: () => import('./pages/projects/projects').then((m) => m.MbProjectsPage),
- },
- {
- path: 'projects/:id',
- loadComponent: () => import('./pages/projects/projects').then((m) => m.MbProjectsPage),
- },
- {
- path: 'events',
- loadComponent: () => import('./pages/events/events').then((m) => m.MbEventsPage),
- },
- {
- path: 'workbench',
- loadComponent: () => import('./pages/workbench/workbench').then((m) => m.MbWorkbenchPage),
- },
- {
- path: 'deliverables',
- loadComponent: () =>
- import('./pages/deliverables/deliverables').then((m) => m.MbDeliverablesPage),
- },
- {
- path: 'mine',
- loadComponent: () => import('./pages/mine/mine').then((m) => m.MbMinePage),
- },
- // 🔴 此处**不能**使用 `**` 兜底:会吞掉 shell 外的全屏路由
- { path: '**', redirectTo: 'home' },
- ],
- },
- ];
|