import request from '@/utils/request' export const CREATE_ORDER_ONE_STANDARD_CODE = 'createOrderOne' export interface DownstreamForwardResult { code?: string msg?: string data?: unknown requestId?: string originalMessage?: string attach?: string /** 原始 HTTP 响应体(便于联调展示) */ raw?: unknown } /** 调用 itfx 网关:POST /InterfaceForward/ForwardWithSubscribe */ export async function forwardCreateOrderOne( supplierCode: string, appKey: string, appSecret: string, body: Record ): Promise { const res = await request({ url: '/api/InterfaceForward/ForwardWithSubscribe', method: 'POST', params: { standardCode: CREATE_ORDER_ONE_STANDARD_CODE, supplierCode, }, headers: { appkey: appKey, appSecret, followName: '0', }, data: body, timeout: 60000, }) if (res && typeof res === 'object') { return { ...(res as DownstreamForwardResult), raw: res } } return { raw: res } }