|
@@ -1,6 +1,7 @@
|
|
|
-import { Routes } from '@angular/router';
|
|
|
-// import { AuthGuard } from '../services/auth.guard';
|
|
|
+import { Routes,mapToCanActivate } from '@angular/router';
|
|
|
+import { AuthGuard } from '../services/auth.guard';
|
|
|
import { CompUserComponent } from './comp-user/comp-user.component';
|
|
|
+import { ProfileComponent } from '../modules/user/profile/profile.component'
|
|
|
|
|
|
export const routes: Routes = [
|
|
|
{ path: '',loadComponent:()=>import('../modules/textbook/page-home/page-home.component').then(m=>m.PageHomeComponent) }, // 默认跳转到 ''
|
|
@@ -9,34 +10,38 @@ export const routes: Routes = [
|
|
|
component: CompUserComponent,
|
|
|
loadChildren:()=> import('../modules/login/modules.routes').then((mod) => mod.LoginRoutingModule),
|
|
|
},
|
|
|
+ {
|
|
|
+ path: 'profile', // 用户登录/注册
|
|
|
+ component: ProfileComponent,
|
|
|
+ },
|
|
|
{
|
|
|
path: 'nav-admin', //国家级管理员管理平台
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-admin/modules.routes').then((mod) => mod.NavAdminRoutingModule),
|
|
|
},
|
|
|
{
|
|
|
path: 'nav-province-submit',//省级教育行政部门
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
|
|
|
},
|
|
|
{
|
|
|
path: 'nav-province-contact',//中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-province-contact/modules.routes').then((mod) => mod.NavProContactRoutingModule),
|
|
|
},
|
|
|
{
|
|
|
path: 'nav-province-school-contact', //省属高校联系人
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-province-school-contact/modules.routes').then((mod) => mod.NavProSchoolRoutingModule),
|
|
|
},
|
|
|
{
|
|
|
path: 'nav-review', //教材评审组成员
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-review/modules.routes').then((mod) => mod.NavReviewRoutingModule),
|
|
|
},
|
|
|
{
|
|
|
path: 'nav-author', //作者 / 教师 / 主编
|
|
|
- // canActivate: [AuthGuard],
|
|
|
+ canActivate: mapToCanActivate([AuthGuard]),
|
|
|
loadChildren: () =>import('../modules/nav-author/modules.routes').then((mod) => mod.NavAuthorRoutingModule),
|
|
|
},
|
|
|
];
|