app.routes.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Routes,mapToCanActivate } from '@angular/router';
  2. import { AuthGuard } from '../services/auth.guard';
  3. import { CompUserComponent } from './comp-user/comp-user.component';
  4. import { ProfileComponent } from '../modules/user/profile/profile.component'
  5. import { CompManageComponent } from './comp-manage/comp-manage.component'
  6. export const routes: Routes = [
  7. { path: '',loadComponent:()=>import('../modules/textbook/page-home/page-home.component').then(m=>m.PageHomeComponent) }, // 默认跳转到 ''
  8. {
  9. path: 'user', // 用户登录/注册
  10. component: CompUserComponent,
  11. loadChildren:()=> import('../modules/login/modules.routes').then((mod) => mod.LoginRoutingModule),
  12. },
  13. {
  14. path: 'profile', // 用户登录/注册
  15. component: ProfileComponent,
  16. },
  17. {
  18. path: 'nav-admin', //国家级管理员管理平台
  19. component: CompManageComponent,
  20. canActivate: mapToCanActivate([AuthGuard]),
  21. loadChildren: () =>import('../modules/nav-admin/modules.routes').then((mod) => mod.NavAdminRoutingModule),
  22. },
  23. {
  24. path: 'nav-province-contact',//报送联系人:中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
  25. component: CompManageComponent,
  26. canActivate: mapToCanActivate([AuthGuard]),
  27. loadChildren: () =>import('../modules/nav-province-contact/modules.routes').then((mod) => mod.NavProContactRoutingModule),
  28. },
  29. // {
  30. // path: 'nav-province-submit',//省级教育行政部门
  31. // component: CompManageComponent,
  32. // canActivate: mapToCanActivate([AuthGuard]),
  33. // loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
  34. // },
  35. {
  36. path: 'nav-province-school-contact', //高校联系人
  37. component: CompManageComponent,
  38. canActivate: mapToCanActivate([AuthGuard]),
  39. loadChildren: () =>import('../modules/nav-province-school-contact/modules.routes').then((mod) => mod.NavProSchoolRoutingModule),
  40. },
  41. {
  42. path: 'nav-review', //教材评审组成员
  43. component: CompManageComponent,
  44. canActivate: mapToCanActivate([AuthGuard]),
  45. loadChildren: () =>import('../modules/nav-review/modules.routes').then((mod) => mod.NavReviewRoutingModule),
  46. },
  47. {
  48. path: 'nav-author', //作者 / 教师 / 主编
  49. component: CompManageComponent,
  50. canActivate: mapToCanActivate([AuthGuard]),
  51. loadChildren: () =>import('../modules/nav-author/modules.routes').then((mod) => mod.NavAuthorRoutingModule),
  52. },
  53. ];