consumer-routing-module.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import { NgModule } from '@angular/core';
  2. import { RouterModule, Routes } from '@angular/router';
  3. import { HomeComponent } from './home/home';
  4. import { BookingRecycle } from './booking-recycle/booking-recycle';
  5. import { EarningsComponent } from './earnings/earnings';
  6. import { PointsMall } from './points-mall/points-mall';
  7. import { EcoKnowledge } from './eco-knowledge/eco-knowledge';
  8. import { AiAssistant } from './ai-assistant/ai-assistant';
  9. import { Profile } from './profile/profile';
  10. import { NotificationsComponent } from './home/notifications/notifications';
  11. import { ArRecognitionComponent } from './home/ar-recognition/ar-recognition';
  12. import { DropPointsComponent } from './home/drop-points/drop-points';
  13. import { CollectorsComponent } from './home/collectors/collectors';
  14. import { ActivitiesComponent } from './home/activities/activities';
  15. // Profile子页面组件导入
  16. import { AddressesComponent } from './profile/addresses/addresses';
  17. import { OrdersComponent } from './profile/orders/orders';
  18. import { FavoritesComponent } from './profile/favorites/favorites';
  19. import { SettingsComponent } from './profile/settings/settings';
  20. import { InviteFriendsComponent } from './profile/invite-friends/invite-friends';
  21. import { CustomerServiceComponent } from './profile/customer-service/customer-service';
  22. import { AboutUsPage } from './profile/about-us/about-us';
  23. import { UserAgreementPage } from './profile/user-agreement/user-agreement';
  24. import { PrivacyPolicyPage } from './profile/privacy-policy/privacy-policy';
  25. const routes: Routes = [
  26. { path: '', redirectTo: 'home', pathMatch: 'full' },
  27. { path: 'home', component: HomeComponent },
  28. { path: 'booking', component: BookingRecycle },
  29. { path: 'booking-recycle', component: BookingRecycle },
  30. { path: 'earnings', component: EarningsComponent },
  31. { path: 'mall', component: PointsMall },
  32. { path: 'points-mall', component: PointsMall },
  33. { path: 'eco-knowledge', component: EcoKnowledge },
  34. { path: 'points-mall/eco-knowledge', component: EcoKnowledge },
  35. { path: 'ai-assistant', component: AiAssistant },
  36. { path: 'profile', component: Profile },
  37. // Profile子页面路由
  38. { path: 'profile/addresses', component: AddressesComponent },
  39. { path: 'profile/orders', component: OrdersComponent },
  40. { path: 'profile/favorites', component: FavoritesComponent },
  41. { path: 'profile/settings', component: SettingsComponent },
  42. { path: 'profile/invite-friends', component: InviteFriendsComponent },
  43. { path: 'profile/customer-service', component: CustomerServiceComponent },
  44. { path: 'profile/about-us', component: AboutUsPage },
  45. { path: 'profile/user-agreement', component: UserAgreementPage },
  46. { path: 'profile/privacy-policy', component: PrivacyPolicyPage },
  47. // 其他页面路由
  48. { path: 'notifications', component: NotificationsComponent },
  49. { path: 'ar-recognition', component: ArRecognitionComponent },
  50. { path: 'drop-points', component: DropPointsComponent },
  51. { path: 'collectors', component: CollectorsComponent },
  52. { path: 'activities', component: ActivitiesComponent }
  53. ];
  54. @NgModule({
  55. imports: [RouterModule.forChild(routes)],
  56. exports: [RouterModule]
  57. })
  58. export class ConsumerRoutingModule { }