fetch(modify):修复API的URL
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s

This commit is contained in:
sexygoat
2026-02-03 10:04:59 +08:00
parent 06cde977ad
commit 2c6fe4375b
17 changed files with 225 additions and 205 deletions

View File

@@ -92,4 +92,24 @@ export class AccountService extends BaseService {
static removeRoleFromAccount(accountId: number, roleId: number): Promise<BaseResponse> {
return this.delete<BaseResponse>(`/api/admin/accounts/${accountId}/roles/${roleId}`)
}
/**
* 修改账号密码
* PUT /api/admin/accounts/{id}/password
* @param id 账号ID
* @param password 新密码
*/
static updateAccountPassword(id: number, password: string): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/accounts/${id}/password`, { password })
}
/**
* 修改账号状态
* PUT /api/admin/accounts/{id}/status
* @param id 账号ID
* @param status 状态 (0:禁用, 1:启用)
*/
static updateAccountStatus(id: number, status: 0 | 1): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/accounts/${id}/status`, { status })
}
}