修复前端金额展示并整理依赖
This commit is contained in:
@@ -185,7 +185,9 @@ export async function cancelOrder(id: number) {
|
||||
}
|
||||
|
||||
export async function submitHandoff(id: number, content: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<HandoffRecord>>(`/orders/${id}/handoffs`, { content })
|
||||
const { data } = await apiClient.post<ApiResponse<HandoffRecord>>(`/orders/${id}/handoffs`, {
|
||||
content,
|
||||
})
|
||||
return data.data
|
||||
}
|
||||
|
||||
@@ -203,7 +205,9 @@ export async function fetchHandoffRecords(id: string | number) {
|
||||
}
|
||||
|
||||
export async function confirmReceive(id: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ confirmed: boolean }>>(`/orders/${id}/receive`)
|
||||
const { data } = await apiClient.post<ApiResponse<{ confirmed: boolean }>>(
|
||||
`/orders/${id}/receive`
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
@@ -248,12 +252,16 @@ export async function confirmCheckout(id: number) {
|
||||
}
|
||||
|
||||
export async function acceptCheckout(id: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ accepted: boolean }>>(`/orders/${id}/checkout/accept`)
|
||||
const { data } = await apiClient.post<ApiResponse<{ accepted: boolean }>>(
|
||||
`/orders/${id}/checkout/accept`
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function rejectCheckout(id: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ rejected: boolean }>>(`/orders/${id}/checkout/reject`)
|
||||
const { data } = await apiClient.post<ApiResponse<{ rejected: boolean }>>(
|
||||
`/orders/${id}/checkout/reject`
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
@@ -288,12 +296,16 @@ export async function adminCloseOrder(id: number, reason: string) {
|
||||
}
|
||||
|
||||
export async function adminMarkOrderAbnormal(id: number, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<Order>>(`/admin/orders/${id}/abnormal`, { reason })
|
||||
const { data } = await apiClient.post<ApiResponse<Order>>(`/admin/orders/${id}/abnormal`, {
|
||||
reason,
|
||||
})
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminRefundStatus(id: number) {
|
||||
const { data } = await apiClient.get<ApiResponse<RefundStatus>>(`/admin/orders/${id}/refund-status`)
|
||||
const { data } = await apiClient.get<ApiResponse<RefundStatus>>(
|
||||
`/admin/orders/${id}/refund-status`
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user