update change password
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'
|
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'
|
||||||
import { CustomValidators } from '../utils/custom-validators';
|
import { CustomValidators } from '../utils/custom-validators';
|
||||||
import { NzMessageService } from 'ng-zorro-antd';
|
import { NzMessageService } from 'ng-zorro-antd';
|
||||||
|
import { Router, ActivatedRoute } from '@angular/router'
|
||||||
import { HttpClientService } from '../services/http-client.service';
|
import { HttpClientService } from '../services/http-client.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -17,6 +18,8 @@ export class ChpwComponent implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private message: NzMessageService,
|
private message: NzMessageService,
|
||||||
|
private router: Router,
|
||||||
|
private route: ActivatedRoute,
|
||||||
private httpClient: HttpClientService) { }
|
private httpClient: HttpClientService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -94,6 +97,7 @@ export class ChpwComponent implements OnInit {
|
|||||||
this.chpwForm.controls[i].markAsUntouched();
|
this.chpwForm.controls[i].markAsUntouched();
|
||||||
this.chpwForm.controls[i].updateValueAndValidity();
|
this.chpwForm.controls[i].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
this.router.navigate(['../app/main'], { relativeTo: this.route });
|
||||||
} else {
|
} else {
|
||||||
this.message.error(response.err_msg + ',修改失败!');
|
this.message.error(response.err_msg + ',修改失败!');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NgZorroAntdModule } from 'ng-zorro-antd';
|
import { NgZorroAntdModule, } from 'ng-zorro-antd';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
||||||
import { ChpwRoutingModule } from './chpw-routing.module'
|
import { ChpwRoutingModule } from './chpw-routing.module'
|
||||||
import { ChpwComponent } from './chpw.component';
|
import { ChpwComponent } from './chpw.component';
|
||||||
|
|||||||
Reference in New Issue
Block a user