支持客服主动发起申诉
This commit is contained in:
@@ -17,6 +17,8 @@ export interface Dispute {
|
||||
owner_phone: string
|
||||
renter_phone: string
|
||||
initiator_id: number
|
||||
initiator_type?: 'user' | 'admin' | string
|
||||
initiator_admin_id?: number
|
||||
target_user_id: number
|
||||
type: string
|
||||
status: DisputeStatus
|
||||
@@ -49,6 +51,22 @@ export async function createDispute(
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminCreateOrderDispute(
|
||||
orderId: number,
|
||||
payload: {
|
||||
type: string
|
||||
description: string
|
||||
target_role: 'owner' | 'renter' | string
|
||||
evidence_urls?: string[]
|
||||
}
|
||||
) {
|
||||
const { data } = await apiClient.post<ApiResponse<Dispute>>(
|
||||
`/admin/orders/${orderId}/dispute`,
|
||||
payload
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function cancelOrderDispute(orderId: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<Dispute>>(`/orders/${orderId}/dispute/cancel`)
|
||||
return data.data
|
||||
|
||||
Reference in New Issue
Block a user