diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index ec54dd1..a330e7d 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,7 +1,6 @@ import { Routes } from '@angular/router'; import {IndexComponent} from "./pages/body/index/index.component"; import {InitGuardService} from "./utils/initGuard.service"; -import {ERROR_ROUTES} from "./pages/error/error.routes"; import {Error404Component} from "./pages/error/error404/error404.component"; export const routes: Routes = [ {path: '', pathMatch: 'full', redirectTo: 'admin/index'}, diff --git a/src/app/pages/body/index/index.component.ts b/src/app/pages/body/index/index.component.ts index dcd6742..0849aff 100644 --- a/src/app/pages/body/index/index.component.ts +++ b/src/app/pages/body/index/index.component.ts @@ -210,6 +210,8 @@ export class IndexComponent { this.storage.remove(DATA); this.storage.remove(USER_TOKEN); this.storage.remove(INIT_FLAG); + location.reload(); + this.router.navigateByUrl('/login').then(); } else { this.message.error(data['return_msg']); diff --git a/src/app/pages/error/error401/error401.component.ts b/src/app/pages/error/error401/error401.component.ts index deb3ba9..a684b4d 100644 --- a/src/app/pages/error/error401/error401.component.ts +++ b/src/app/pages/error/error401/error401.component.ts @@ -35,7 +35,8 @@ export class Error401Component { this.storage.remove(DATA); this.storage.remove(USER_TOKEN); this.storage.remove(INIT_FLAG); - this.router.navigateByUrl('/login').then(); + this.router.navigate(['/login']).then(r => console.log(r)); + } else { this.message.error(data['return_msg']); } diff --git a/src/app/pages/login/login.module.ts b/src/app/pages/login/login.module.ts index 0fd089f..681985d 100644 --- a/src/app/pages/login/login.module.ts +++ b/src/app/pages/login/login.module.ts @@ -1,12 +1,10 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { NzSliderModule } from 'ng-zorro-antd/slider'; @NgModule({ declarations: [], imports: [ CommonModule, - NzSliderModule, ] }) export class LoginModule { } diff --git a/src/app/pages/login/login/login.component.ts b/src/app/pages/login/login/login.component.ts index d32a347..d428872 100644 --- a/src/app/pages/login/login/login.component.ts +++ b/src/app/pages/login/login/login.component.ts @@ -100,7 +100,8 @@ export class LoginComponent { this.storage.set(DATA, data['return_data']['object']); this.storage.set(USER_TOKEN, data['return_data']['token']); this.storage.set(INIT_FLAG, true); - this.router.navigateByUrl('/admin/index').then(r => console.log("返回内容" ,r)); + this.router.navigateByUrl('/admin/index'); + } else { this.message.error(data['return_msg']); } diff --git a/src/app/pages/settlement/detail/detail.component.ts b/src/app/pages/settlement/detail/detail.component.ts index 1336ca1..fcfea48 100644 --- a/src/app/pages/settlement/detail/detail.component.ts +++ b/src/app/pages/settlement/detail/detail.component.ts @@ -77,7 +77,8 @@ export class DetailComponent { finishTimeE: [''], payType: [''], }); - + let timeObj = DateUtils.getDate(new Date(), Number(5)); + this.searchForm.controls['finishTimeArray'].setValue([timeObj.timeS, timeObj.timeE]); this.objectType = this.storage.get(DATA)['account']['objectType']; this.getRequest(); this.merList(); diff --git a/src/app/pages/settlement/list/list.component.html b/src/app/pages/settlement/list/list.component.html index bb38959..59cd094 100644 --- a/src/app/pages/settlement/list/list.component.html +++ b/src/app/pages/settlement/list/list.component.html @@ -54,7 +54,7 @@