feat: fix table alignment in product view and implement self-service password update with role masking
This commit is contained in:
@ -49,4 +49,21 @@ export function deleteUser(id: number) {
|
||||
url: `/v1/auth/user/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 【新增】获取当前登录用户的个人资料(只含姓名/账号/部门,严格脱敏)
|
||||
export function getMyProfile() {
|
||||
return request({
|
||||
url: '/v1/auth/me',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 【新增】自我修改密码(验证旧密码,无需管理员权限)
|
||||
export function changeMyPassword(data: { old_password: string; new_password: string; confirm_password: string }) {
|
||||
return request({
|
||||
url: '/v1/auth/me/password',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user