import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; // 引用路由守卫 import { authGuard } from 'src/modules/user/auth.guard'; import { AiAssistantPage } from './ai-assistant/ai-assistant.page'; const routes: Routes = [ {path: 'ai-assistant', loadChildren: () => import('./ai-assistant/ai-assistant.module').then(m => m.AiAssistantPageModule) }, { path: '', loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule) }, { path: 'language-settings', loadChildren: () => import('./language-settings/language-settings.module').then( m => m.LanguageSettingsPageModule) }, { path: 'edit-info', loadChildren: () => import('../modules/user/edit-info/edit-info-routing.module').then(m => m.EditInfoPageRoutingModule) }, { path: 'user', loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule) }, { path: 'find', loadChildren: () => import('./find/find.module').then( m => m.FindPageModule) }, { path: 'auth', loadChildren: () => import('./auth/auth.module').then(m => m.AuthPageModule) }, { path: 'profile-edit', loadChildren: () => import('./profile-edit/profile-edit.module').then(m => m.ProfileEditPageModule) }, { path:"study", children:[ { path: 'parse', loadChildren: () => import('../modules/study/case-js-module/case-parse/case-parse.module').then( m => m.CaseParsePageModule) }, { path: 'case-petmarket', loadChildren: () => import('../modules/study/case-js-module/case-parse-petmarket/case-parse-petmarket.module').then( m => m.CaseParsePetmarketPageModule) }, { path: 'Shangpin/:id', loadChildren: () => import('../modules/study/case-js-module/case-pet-detail/case-pet-detail.module').then( m => m.CasePetDetailPageModule) }, { path: 'Shangpin/edit/:id', // 编辑宠物 loadChildren: () => import('../modules/study/case-js-module/case-pet-edit/case-pet-edit.module').then( m => m.CasePetEditPageModule) }, ] }, { path: 'auth', loadChildren: () => import('./auth/auth.module').then( m => m.AuthPageModule) }, { path: 'profile-edit', loadChildren: () => import('./profile-edit/profile-edit.module').then( m => m.ProfileEditPageModule) }, ]; @NgModule({ imports: [ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) ], exports: [RouterModule] }) export class AppRoutingModule {}