feat: 个人中心 - 修改密码
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { UserProfile } from './model';
|
||||
import type { UpdatePasswordParam, UserProfile } from './model';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
@@ -30,6 +30,8 @@ export function userProfileUpdate(data: any) {
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function userUpdatePassword(data: any) {
|
||||
return requestClient.put<void>(Api.updatePassword, data, { encrypt: true });
|
||||
export function userUpdatePassword(data: UpdatePasswordParam) {
|
||||
return requestClient.putWithMsg<void>(Api.updatePassword, data, {
|
||||
encrypt: true,
|
||||
});
|
||||
}
|
||||
|
@@ -62,3 +62,8 @@ export interface UserProfile {
|
||||
roleGroup: string;
|
||||
postGroup: string;
|
||||
}
|
||||
|
||||
export interface UpdatePasswordParam {
|
||||
oldPassword: string;
|
||||
newPassword: string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user