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.
107 lines
3.5 KiB
107 lines
3.5 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 {RouteStrategyService} from "./services/route-strategy.service";
|
|
|
|
const routes: Routes = [
|
|
{path: '', pathMatch: 'full', redirectTo: 'adminLogin'},
|
|
{
|
|
path: 'adminLogin',
|
|
loadChildren: () => import('./admin/login/login.module').then(m => m.LoginModule)
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadChildren: () => import('./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: 'user',
|
|
loadChildren: () => import('./admin/user/user.module').then(m => m.UserModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'merchant',
|
|
loadChildren: () => import('./admin/merchant/merchant.module').then(m => m.MerchantModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'merchantStore',
|
|
loadChildren: () => import('./admin/merchant-store/merchant-store.module').then(m => m.MerchantStoreModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'coupon',
|
|
loadChildren: () => import('./admin/coupon/coupon.module').then(m => m.CouponModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'company',
|
|
loadChildren: () => import('./admin/company/company.module').then(m => m.CompanyModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'price',
|
|
loadChildren: () => import('./admin/price/price.module').then(m => m.PriceModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'audit',
|
|
loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'order',
|
|
loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'discount',
|
|
loadChildren: () => import('./admin/discount/discount.module').then(m => m.DiscountModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'system',
|
|
loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'agent',
|
|
loadChildren: () => import('./admin/agent/agent.module').then(m => m.AgentModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'rechargeOrder',
|
|
loadChildren: () => import('./admin/recharge-order/recharge-order.module').then(m => m.RechargeOrderModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'cms',
|
|
loadChildren: () => import('./admin/cms/cms.module').then(m => m.CmsModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
{
|
|
path: 'activate',
|
|
loadChildren: () => import('./admin/activate/activate.module').then(m => m.ActivateModule),
|
|
canActivate: [InitGuardService]
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule],
|
|
providers: [
|
|
// { provide: RouteReuseStrategy, useClass: RouteStrategyService }
|
|
],
|
|
})
|
|
export class AppRoutingModule {
|
|
}
|
|
|