app-routing.module.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import { NgModule } from '@angular/core';
  2. import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
  3. // 引用路由守卫
  4. import { authGuard } from 'src/modules/user/auth.guard';
  5. import { AiAssistantPage } from './ai-assistant/ai-assistant.page';
  6. const routes: Routes = [
  7. {path: 'ai-assistant',
  8. loadChildren: () => import('./ai-assistant/ai-assistant.module').then(m => m.AiAssistantPageModule)
  9. },
  10. {
  11. path: '',
  12. loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  13. },
  14. {
  15. path: 'language-settings',
  16. loadChildren: () => import('./language-settings/language-settings.module').then( m => m.LanguageSettingsPageModule)
  17. },
  18. {
  19. path: 'edit-info',
  20. loadChildren: () => import('../modules/user/edit-info/edit-info-routing.module').then(m => m.EditInfoPageRoutingModule)
  21. },
  22. {
  23. path: 'user',
  24. loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
  25. },
  26. {
  27. path: 'find',
  28. loadChildren: () => import('./find/find.module').then( m => m.FindPageModule)
  29. },
  30. {
  31. path: 'auth',
  32. loadChildren: () => import('./auth/auth.module').then(m => m.AuthPageModule)
  33. },
  34. {
  35. path: 'profile-edit',
  36. loadChildren: () => import('./profile-edit/profile-edit.module').then(m => m.ProfileEditPageModule)
  37. },
  38. {
  39. path:"study",
  40. children:[
  41. {
  42. path: 'parse',
  43. loadChildren: () => import('../modules/study/case-js-module/case-parse/case-parse.module').then( m => m.CaseParsePageModule)
  44. },
  45. {
  46. path: 'case-petmarket',
  47. loadChildren: () => import('../modules/study/case-js-module/case-parse-petmarket/case-parse-petmarket.module').then( m => m.CaseParsePetmarketPageModule)
  48. },
  49. {
  50. path: 'Shangpin/:id',
  51. loadChildren: () => import('../modules/study/case-js-module/case-pet-detail/case-pet-detail.module').then( m => m.CasePetDetailPageModule)
  52. },
  53. {
  54. path: 'Shangpin/edit/:id', // 编辑宠物
  55. loadChildren: () => import('../modules/study/case-js-module/case-pet-edit/case-pet-edit.module').then( m => m.CasePetEditPageModule)
  56. },
  57. ]
  58. },
  59. {
  60. path: 'auth',
  61. loadChildren: () => import('./auth/auth.module').then( m => m.AuthPageModule)
  62. },
  63. {
  64. path: 'profile-edit',
  65. loadChildren: () => import('./profile-edit/profile-edit.module').then( m => m.ProfileEditPageModule)
  66. },
  67. ];
  68. @NgModule({
  69. imports: [
  70. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  71. ],
  72. exports: [RouterModule]
  73. })
  74. export class AppRoutingModule {}