|
|
|
@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
|
|
|
|
|
import { Routes, RouterModule } from '@angular/router'; |
|
|
|
|
import { LoginComponent } from './pages/login/login.component'; |
|
|
|
|
import { NavigationComponent } from './navigation/navigation.component'; |
|
|
|
|
import { LockscreenComponent } from './pages/lockscreen/lockscreen.component'; |
|
|
|
|
import {HomeComponent} from './home/home.component' |
|
|
|
|
|
|
|
|
|
//路由守卫
|
|
|
|
@ -11,13 +10,10 @@ import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const routes: Routes = [ |
|
|
|
|
{path:'',redirectTo:'login',pathMatch:'full'}, |
|
|
|
|
{ |
|
|
|
|
path:'', |
|
|
|
|
component:NavigationComponent, |
|
|
|
|
canActivate: [AuthGuard],//守卫验证
|
|
|
|
|
path:'',component:NavigationComponent,canActivate: [AuthGuard],//守卫验证
|
|
|
|
|
children:[ |
|
|
|
|
{path:'ui',loadChildren:() => import('./ui/ui.module').then(m => m.UiModule)}, |
|
|
|
|
{path:'keyUnit',loadChildren:() => import('./key-unit/key-unit.module').then(m => m.KeyUnitModule)}, |
|
|
|
@ -30,15 +26,9 @@ const routes: Routes = [
|
|
|
|
|
{path:'dataCollection',loadChildren:() => import('./data-collection/data-collection.module').then(m => m.DataCollectionModule)}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{path:'login', |
|
|
|
|
component:LoginComponent}, |
|
|
|
|
|
|
|
|
|
{path:'getNoMToken', |
|
|
|
|
component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
|
|
|
|
|
|
|
|
|
|
{path:'lockscreen', |
|
|
|
|
component:LockscreenComponent, |
|
|
|
|
canActivate: [AuthGuard]}//守卫验证
|
|
|
|
|
{path:'login',component:LoginComponent}, |
|
|
|
|
{path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
@NgModule({ |
|
|
|
|