- 新增小红书前端模块(启动服务、内容分析、爆款创作、发布记录、技能卡片、拟人设置、AI 助手) - 新增 xhs-agent-desktop 独立桌面 Agent,对接 OMS 任务调度 - 登录页重构,整合微信登录与 OMS JWT 认证 - 订单、渠道、用户中心等页面与 API 增强 Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
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<string, unknown>
|
||
): Promise<DownstreamForwardResult> {
|
||
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 }
|
||
}
|