优化
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { overseasHttp } from '@/shared/api/overseasHttp'
|
||||
import { unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http'
|
||||
import { http, unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http'
|
||||
|
||||
|
||||
export interface ContainerArrivalTime {
|
||||
sourceContainerBookingId: string
|
||||
@@ -16,7 +16,7 @@ function operationId(containerBookingId: string) {
|
||||
|
||||
export async function listContainerArrivalTimes(sourceContainerBookingIds: string[]) {
|
||||
if (!sourceContainerBookingIds.length) return []
|
||||
const response = await overseasHttp.post<ApiEnvelope<ContainerArrivalTime[]>, ApiEnvelope<ContainerArrivalTime[]>>(
|
||||
const response = await http.post<ApiEnvelope<ContainerArrivalTime[]>, ApiEnvelope<ContainerArrivalTime[]>>(
|
||||
queryPath,
|
||||
{ sourceContainerBookingIds },
|
||||
)
|
||||
@@ -27,7 +27,7 @@ export async function updateContainerExpectedArrival(
|
||||
sourceContainerBookingId: string,
|
||||
body: { estimatedWarehouseArrivalAt: string; expectedVersion: number; remark?: string },
|
||||
) {
|
||||
const response = await overseasHttp.put<ApiEnvelope<ContainerArrivalTime>, ApiEnvelope<ContainerArrivalTime>>(
|
||||
const response = await http.put<ApiEnvelope<ContainerArrivalTime>, ApiEnvelope<ContainerArrivalTime>>(
|
||||
`/platform/v1/last-leg/orders/container-summaries/${encodeURIComponent(sourceContainerBookingId)}/expected-arrival`,
|
||||
body,
|
||||
{ headers: { 'Idempotency-Key': operationId(sourceContainerBookingId) } },
|
||||
|
||||
Reference in New Issue
Block a user