优化后台列表搜索
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user