update change password

This commit is contained in:
zhiqiang feng
2022-09-21 16:08:26 +08:00
parent 9deddf8dc5
commit ba185bd4eb
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'
import { CustomValidators } from '../utils/custom-validators';
import { NzMessageService } from 'ng-zorro-antd';
import { Router, ActivatedRoute } from '@angular/router'
import { HttpClientService } from '../services/http-client.service';
@Component({
@@ -17,6 +18,8 @@ export class ChpwComponent implements OnInit {
constructor(
private formBuilder: FormBuilder,
private message: NzMessageService,
private router: Router,
private route: ActivatedRoute,
private httpClient: HttpClientService) { }
ngOnInit() {
@@ -94,6 +97,7 @@ export class ChpwComponent implements OnInit {
this.chpwForm.controls[i].markAsUntouched();
this.chpwForm.controls[i].updateValueAndValidity();
}
this.router.navigate(['../app/main'], { relativeTo: this.route });
} else {
this.message.error(response.err_msg + ',修改失败!');
}
+1 -1
View File
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { NgZorroAntdModule, } from 'ng-zorro-antd';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { ChpwRoutingModule } from './chpw-routing.module'
import { ChpwComponent } from './chpw.component';