mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
个人资料、密码修改优化
This commit is contained in:
@@ -70,9 +70,9 @@ export class ProfileComponent implements OnInit {
|
||||
submitting: boolean;
|
||||
model: Users;
|
||||
} = {
|
||||
submitting: false,
|
||||
model: new Users()
|
||||
};
|
||||
submitting: false,
|
||||
model: new Users()
|
||||
};
|
||||
|
||||
formGroup: FormGroup = new FormGroup({});
|
||||
|
||||
@@ -102,7 +102,7 @@ export class ProfileComponent implements OnInit {
|
||||
private msg: NzMessageService,
|
||||
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
||||
private cdr: ChangeDetectorRef
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.usersService.getProfile().subscribe(res => {
|
||||
|
||||
@@ -28,13 +28,13 @@ import { BaseService } from './base.service';
|
||||
})
|
||||
export class PasswordService extends BaseService<ChangePassword> {
|
||||
constructor(private _httpClient: HttpClient) {
|
||||
super(_httpClient, '/config');
|
||||
super(_httpClient, '/users');
|
||||
}
|
||||
|
||||
public changePassword(body: NzSafeAny): Observable<Message<ChangePassword>> {
|
||||
return this.http.put<Message<ChangePassword>>('/config/changePassword', body);
|
||||
return this.http.put<Message<ChangePassword>>('/users/changePassword', body);
|
||||
}
|
||||
public passwordpolicy(): Observable<Message<ChangePassword>> {
|
||||
return this.http.put<Message<ChangePassword>>('/config/passwordpolicy',null);
|
||||
return this.http.get<Message<ChangePassword>>('/users/passwordpolicy', {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ export class UsersService extends BaseService<Users> {
|
||||
}
|
||||
|
||||
getProfile(): Observable<Message<Users>> {
|
||||
return this.http.get<Message<Users>>('/config/profile/get', {});
|
||||
return this.http.get<Message<Users>>('/users/profile/get', {});
|
||||
}
|
||||
|
||||
updateProfile(body: any): Observable<Message<Users>> {
|
||||
return this.http.put<Message<Users>>('/config/profile/update', body);
|
||||
return this.http.put<Message<Users>>('/users/profile/update', body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user