优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { overseasApiRequest } from '@/api/overseasHttp'
|
||||
import { apiRequest } from '@/api/http'
|
||||
|
||||
export interface PageResult<T> { records: T[]; page: number; size: number; total: number; pages: number }
|
||||
export interface InboundPlanQuery {
|
||||
@@ -66,10 +66,10 @@ export interface InboundPlanDetail {
|
||||
}
|
||||
|
||||
export async function listInboundPlans(params: InboundPlanQuery) {
|
||||
const result = await overseasApiRequest<PageResult<InboundPlanSummary>>({ method: 'GET', url: '/merchant/v1/last-leg/inbound-plans', params })
|
||||
const result = await apiRequest<PageResult<InboundPlanSummary>>({ method: 'GET', url: '/merchant/v1/last-leg/inbound-plans', params })
|
||||
return { ...result, page: Number(result.page), size: Number(result.size), total: Number(result.total), pages: Number(result.pages) }
|
||||
}
|
||||
|
||||
export function getInboundPlan(planNo: string) {
|
||||
return overseasApiRequest<InboundPlanDetail>({ method: 'GET', url: `/merchant/v1/last-leg/inbound-plans/${encodeURIComponent(planNo)}` })
|
||||
return apiRequest<InboundPlanDetail>({ method: 'GET', url: `/merchant/v1/last-leg/inbound-plans/${encodeURIComponent(planNo)}` })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user