feat: 完善15- 角色默认信用与店铺实际额度管理
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m8s

This commit is contained in:
luo
2026-07-25 11:55:44 +08:00
parent 9289a6e940
commit ee508c3e1e
16 changed files with 457 additions and 100 deletions

View File

@@ -9,6 +9,7 @@ import type {
RoleQueryParams,
PlatformRoleFormData,
UpdateRoleDefaultCreditRequest,
UpdateRoleDefaultCreditResponse,
BaseResponse,
PaginationResponse
} from '@/types/api'
@@ -47,7 +48,7 @@ export class RoleService extends BaseService {
* @param id 角色ID
* @param data 角色数据
*/
static updateRole(id: number, data: PlatformRoleFormData): Promise<BaseResponse> {
static updateRole(id: number, data: Partial<PlatformRoleFormData>): Promise<BaseResponse> {
return this.update(`/api/admin/roles/${id}`, data)
}
@@ -60,8 +61,11 @@ export class RoleService extends BaseService {
static updateRoleDefaultCredit(
id: number,
data: UpdateRoleDefaultCreditRequest
): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/roles/${id}/default-credit`, data)
): Promise<BaseResponse<UpdateRoleDefaultCreditResponse>> {
return this.put<BaseResponse<UpdateRoleDefaultCreditResponse>>(
`/api/admin/roles/${id}/default-credit`,
data
)
}
/**

View File

@@ -11,6 +11,7 @@ import type {
ShopRolesResponse,
AssignShopRolesRequest,
UpdateShopCreditLimitRequest,
UpdateShopCreditLimitResponse,
BaseResponse,
PaginationResponse,
ShopBusinessOwnerCandidate,
@@ -148,7 +149,10 @@ export class ShopService extends BaseService {
static updateShopCreditLimit(
shopId: number,
data: UpdateShopCreditLimitRequest
): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/shops/${shopId}/credit-limit`, data)
): Promise<BaseResponse<UpdateShopCreditLimitResponse>> {
return this.put<BaseResponse<UpdateShopCreditLimitResponse>>(
`/api/admin/shops/${shopId}/credit-limit`,
data
)
}
}