23 lines
747 B
TypeScript
23 lines
747 B
TypeScript
import { apiGet, apiPost } from '@/lib/http'
|
|
import type { AdminOrderDetail, AdminOrderListItem, AdminPagination } from '@/types/admin'
|
|
|
|
export function fetchAdminOrders(params?: Record<string, unknown>) {
|
|
return apiGet<{ items: AdminOrderListItem[]; pagination: AdminPagination }>(
|
|
'/api/v1/admin/orders',
|
|
params,
|
|
)
|
|
}
|
|
|
|
export function fetchAdminOrderDetail(orderId: number | string) {
|
|
return apiGet<AdminOrderDetail>(`/api/v1/admin/orders/${orderId}`)
|
|
}
|
|
|
|
export function resendAdminOrderKuaishouIndustryVoucherCode(orderId: number | string) {
|
|
return apiPost<{
|
|
success: boolean
|
|
resentCount: number
|
|
failedCount: number
|
|
errorMessage: string
|
|
}>(`/api/v1/admin/orders/${orderId}/kuaishou-industry/resend-code`, {})
|
|
}
|