优化后台列表搜索

This commit is contained in:
yml2213
2026-06-21 13:17:10 +08:00
parent a0145e6b18
commit 23dbe9af22
11 changed files with 166 additions and 21 deletions
@@ -35,6 +35,12 @@ export interface Dispute {
updated_at: string
}
export interface AdminDisputeQuery {
keyword?: string
status?: string
type?: string
}
export async function createDispute(
orderId: number,
payload: { type: string; description: string; evidence_urls?: string[] }
@@ -60,9 +66,9 @@ export async function fetchDisputes(page = 1, pageSize = 20) {
return data.data
}
export async function fetchAdminDisputes(page = 1, pageSize = 20) {
export async function fetchAdminDisputes(page = 1, pageSize = 20, query: AdminDisputeQuery = {}) {
const { data } = await apiClient.get<ApiResponse<PaginatedResult<Dispute>>>('/admin/disputes', {
params: { page, page_size: pageSize },
params: { page, page_size: pageSize, ...query },
})
return data.data
}