中化加油站项目
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.
 
 
 
 
 
 

39 lines
937 B

import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef } from '@angular/material/dialog';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-changepassword',
templateUrl: './changepassword.component.html',
styleUrls: ['./changepassword.component.scss']
})
export class ChangepasswordComponent implements OnInit {
constructor(private http: HttpClient,
public dialogRef: MatDialogRef<ChangepasswordComponent>, private message: NzMessageService) { }
ngOnInit() {
}
errmsg: string = ''
onSubmit(e) {
this.http.put(
'/api/CompanyAccount/Password',
{
newPassword: e.newPassword,
password: e.password
}
).subscribe(data => {
this.dialogRef.close(data);
this.message.create('success', `密码修改成功`);
}, (err) => { this.errmsg = err }
)
}
}