diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d6f7b0c7..d902543a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,18 +1,14 @@ /* eslint-disable import/order */ /* eslint-disable import/no-duplicates */ -import { HttpClientModule } from '@angular/common/http'; -import { default as ngLang } from '@angular/common/locales/zh'; -import { APP_INITIALIZER, DEFAULT_CURRENCY_CODE, LOCALE_ID, NgModule, Type } from '@angular/core'; +import { APP_INITIALIZER, DEFAULT_CURRENCY_CODE, NgModule, Type } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { SimpleInterceptor } from '@delon/auth'; -import { NzNotificationModule } from 'ng-zorro-antd/notification'; import zh from '@angular/common/locales/zh'; registerLocaleData(zh); // #region global third module -import { BidiModule } from '@angular/cdk/bidi'; -const GLOBAL_THIRD_MODULES: Array> = [BidiModule]; +const GLOBAL_THIRD_MODULES: Array> = []; // #endregion @@ -43,37 +39,19 @@ const APPINIT_PROVIDES = [ }, { provide: DEFAULT_CURRENCY_CODE, useValue: '¥' }, { provide: RouteReuseStrategy, useClass: ReuseTabStrategy, deps: [ReuseTabService] }, - AuthGuard ]; // #endregion import { AppComponent } from './app.component'; import { CoreModule } from './core/core.module'; -import { GlobalConfigModule } from './global-config.module'; -import { LayoutModule } from './layout/layout.module'; import { RoutesModule } from './routes/routes.module'; -import { SharedModule } from './shared/shared.module'; -import { STWidgetModule } from './shared/widget/st-widget.module'; import { registerLocaleData } from '@angular/common'; -import { AuthGuard } from './core/guards/auth.guard'; -import { RouteReuseStrategy } from '@angular/router'; +import { RouteReuseStrategy, RouterModule } from '@angular/router'; import { ReuseTabService, ReuseTabStrategy } from '@delon/abc/reuse-tab'; @NgModule({ declarations: [AppComponent], - imports: [ - BrowserModule, - BrowserAnimationsModule, - HttpClientModule, - GlobalConfigModule.forRoot(), - CoreModule, - SharedModule, - LayoutModule, - RoutesModule, - STWidgetModule, - NzNotificationModule, - ...GLOBAL_THIRD_MODULES - ], + imports: [BrowserModule, BrowserAnimationsModule, CoreModule, RoutesModule, RouterModule, ...GLOBAL_THIRD_MODULES], providers: [...INTERCEPTOR_PROVIDES, ...APPINIT_PROVIDES], bootstrap: [AppComponent] }) diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 777d8016..e354893b 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -1,10 +1,11 @@ import { NgModule, Optional, SkipSelf } from '@angular/core'; +import { AuthGuard } from './guards/auth.guard'; import { EATokenGuard } from './guards/token.guard'; import { throwIfAlreadyLoaded } from './module-import-guard'; @NgModule({ - providers: [EATokenGuard] + providers: [AuthGuard, EATokenGuard] }) export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { diff --git a/src/app/routes/contract-management/components/contract-detail/contract-detail.component.ts b/src/app/routes/contract-management/components/contract-detail/contract-detail.component.ts index 2070a2e2..43fe22f7 100644 --- a/src/app/routes/contract-management/components/contract-detail/contract-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-detail/contract-detail.component.ts @@ -22,11 +22,8 @@ import { ContractManagementService } from '../../services/contract-management.se }) export class ContractManagementDetailComponent implements OnInit { constructor( - private nzModalService: NzModalService, public service: ContractManagementService, - public route: ActivatedRoute, - private datePipe: DatePipe, - private router: Router + public route: ActivatedRoute ) {} textStatus = '合同详情'; name: any; diff --git a/src/app/routes/dashboard/dashboard.component.html b/src/app/routes/dashboard/dashboard.component.html deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/routes/dashboard/dashboard.component.less b/src/app/routes/dashboard/dashboard.component.less deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/routes/dashboard/dashboard.component.ts b/src/app/routes/dashboard/dashboard.component.ts index fe11f0cf..5da21102 100644 --- a/src/app/routes/dashboard/dashboard.component.ts +++ b/src/app/routes/dashboard/dashboard.component.ts @@ -2,7 +2,6 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-dashboard', - templateUrl: './dashboard.component.html', - styleUrls: ['./dashboard.component.less'] + template: '' }) export class DashboardComponent {} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index ac82cbfc..392cbd38 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -83,11 +83,6 @@ const routes: Routes = [ ] }, // passport - { - path: 'agreement', - component: OrderAgreementComponent, - data: { title: '协议', titleI18n: 'app.login.agreement' } - }, { path: '', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) }, { path: 'exception', loadChildren: () => import('./exception/exception.module').then(m => m.ExceptionModule) }, // 单页不包裹Layout diff --git a/src/app/routes/routes.module.ts b/src/app/routes/routes.module.ts index a185d251..c3bc2114 100644 --- a/src/app/routes/routes.module.ts +++ b/src/app/routes/routes.module.ts @@ -1,16 +1,24 @@ import { NgModule, Type } from '@angular/core'; -import { SharedModule } from '@shared'; +import { SharedModule, STWidgetModule } from '@shared'; // dashboard pages import { DashboardComponent } from './dashboard/dashboard.component'; import { RouteRoutingModule } from './routes-routing.module'; import { BasicTableComponent } from './commom/components/basic-table/basic-table.component'; +import { LayoutModule } from '../layout/layout.module'; +import { GlobalConfigModule } from '../global-config.module'; const COMPONENTS = [DashboardComponent, BasicTableComponent]; const COMPONENTS_NOROUNT: Array> = []; @NgModule({ - imports: [SharedModule, RouteRoutingModule], + imports: [ + LayoutModule, + SharedModule, + GlobalConfigModule.forRoot(), + STWidgetModule, + RouteRoutingModule + ], declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT], entryComponents: COMPONENTS_NOROUNT }) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index 17924f87..c255e354 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -98,7 +98,7 @@ 国家法规及行政命令禁限运货物不能托运 - 《禁运物品说明》 + 《禁运物品说明》 diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 41bf1dcf..a7d3925e 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -146,7 +146,7 @@ 国家法规及行政命令禁限运货物不能托运 - 《禁运物品说明》 + 《禁运物品说明》 @@ -201,7 +201,7 @@ ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》 + [queryParams]="{ type: 10 }" [routerLink]="['/passport/agreement']">《保险告知函》 diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index f1c553d4..9c9e7e80 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -145,7 +145,7 @@ 国家法规及行政命令禁限运货物不能托运 - 《禁运物品说明》 + 《禁运物品说明》 @@ -200,7 +200,7 @@ ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》 + [queryParams]="{ type: 10 }" [routerLink]="['/passport/agreement']">《保险告知函》 diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html index 12b02806..619a533a 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html @@ -56,7 +56,7 @@ + [scroll]="{ x: '1200px',y:scrollY }" [loading]="false" (change)="stChange($event)"> diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 50040d13..1cc91d9e 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -40,6 +40,7 @@ import { AccountDetailComponent } from './components/account-detail/account-deta import { CaptchaModule } from './components/captcha'; import { rebateTableModule } from './components/rebate-table'; import { SearchDrawerModule } from './components/search-drawer'; +import { HttpClientModule } from '@angular/common/http'; // import { SearchDrawerComponent } from './components/search-drawer/search-drawer.component'; @@ -71,6 +72,7 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou CommonModule, FormsModule, RouterModule, + HttpClientModule, ReactiveFormsModule, AlainThemeModule.forChild(), DelonACLModule, @@ -83,6 +85,7 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou exports: [ CommonModule, FormsModule, + HttpClientModule, ReactiveFormsModule, RouterModule, AlainThemeModule,