You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
3.9 KiB
117 lines
3.9 KiB
import {NgModule} from '@angular/core';
|
|
import {Routes, RouterModule, RouteReuseStrategy} from '@angular/router';
|
|
import {NavigationComponent} from './admin/navigation/navigation.component';
|
|
import {InitGuardService} from './services/init-guard.service';
|
|
import {Error404Component} from './common/error/error404/error404.component';
|
|
|
|
const routes: Routes = [
|
|
{path: '', pathMatch: 'full', redirectTo: '/login'},
|
|
{
|
|
path: 'login',
|
|
loadChildren: () => import('./admin/login/login.module').then(m => m.LoginModule)
|
|
},
|
|
{
|
|
path: 'admin', component: NavigationComponent,
|
|
children: [
|
|
{
|
|
path: 'index',
|
|
loadChildren: () => import('./admin/index/index.module').then(m => m.IndexModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'device',
|
|
loadChildren: () => import('./admin/device/device.module').then(m => m.DeviceModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'pay-qrCode',
|
|
loadChildren: () => import('./admin/pay-qr-code/pay-qr-code.module').then(m => m.PayQrCodeModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'company',
|
|
loadChildren: () => import('./admin/company/company.module').then(m => m.CompanyModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'agent',
|
|
loadChildren: () => import('./admin/agent/agent.module').then(m => m.AgentModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'store',
|
|
loadChildren: () => import('./admin/store/store.module').then(m => m.StoreModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'mer',
|
|
loadChildren: () => import('./admin/mer/mer.module').then(m => m.MerModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'trade-order',
|
|
loadChildren: () => import('./admin/trade-order/trade-order.module').then(m => m.TradeOrderModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'trade-checking',
|
|
loadChildren: () => import('./admin/trade-checking/trade-checking.module').then(m => m.TradeCheckingModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'store-device',
|
|
loadChildren: () => import('./admin/store-device/store-device.module').then(m => m.StoreDeviceModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'store-discount-activity',
|
|
loadChildren: () => import('./admin/store-discount-activity/store-discount-activity.module').then(m => m.StoreDiscountActivityModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'salesman',
|
|
loadChildren: () => import('./admin/salesman/salesman.module').then(m => m.SalesmanModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'platform',
|
|
loadChildren: () => import('./admin/platform/platform.module').then(m => m.PlatformModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'system',
|
|
loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'cms',
|
|
loadChildren: () => import('./admin/cms/cms.module').then(m => m.CmsModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'activity-money',
|
|
loadChildren: () => import('./admin/activity-money/activity-money.module').then(m => m.ActivityMoneyModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: 'error',
|
|
children: [
|
|
{path: '', loadChildren: () => import('./common/error/error.module').then(m => m.ErrorModule)},
|
|
]
|
|
},
|
|
{
|
|
path: '**', component: Error404Component
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule],
|
|
providers: [
|
|
// { provide: RouteReuseStrategy, useClass: RouteStrategyService }
|
|
],
|
|
})
|
|
export class AppRoutingModule {
|
|
}
|
|
|