@be-link/ecommerce-trade-service-node-sdk 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -100,6 +100,8 @@ export declare namespace PosOrderQueryService {
|
|
|
100
100
|
createdAt: number;
|
|
101
101
|
source: ENUM.OrderSource;
|
|
102
102
|
platform: ENUM.OrderPlatform;
|
|
103
|
+
productId: string;
|
|
104
|
+
skuId: string;
|
|
103
105
|
productImage: string;
|
|
104
106
|
productName: string;
|
|
105
107
|
productSpec: string;
|
|
@@ -108,6 +110,7 @@ export declare namespace PosOrderQueryService {
|
|
|
108
110
|
actualAmount: number;
|
|
109
111
|
orderStatus: ENUM.OrderStatus;
|
|
110
112
|
refundStatus: ENUM.OrderRefundStatus;
|
|
113
|
+
verificationStatus: string;
|
|
111
114
|
receiverName: string;
|
|
112
115
|
receiverPhone: string;
|
|
113
116
|
productPick: string;
|
package/package.json
CHANGED
package/utils/http.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare module '@fastify/request-context' {
|
|
|
5
5
|
pandoraUserId?: string;
|
|
6
6
|
beLinkUserId?: string;
|
|
7
7
|
pandoraRoleId?: string;
|
|
8
|
+
realIp?: string;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
export declare function callApi<T extends (...args: any[]) => Promise<any>>(url: string, request?: Parameters<T>[0]): Promise<Awaited<ReturnType<T>>>;
|
package/utils/http.js
CHANGED
|
@@ -59,6 +59,7 @@ async function callApi(url, request) {
|
|
|
59
59
|
const pandoraUserId = request_context_1.requestContext.get('pandoraUserId') || '';
|
|
60
60
|
const beLinkUserId = request_context_1.requestContext.get('beLinkUserId') || '';
|
|
61
61
|
const pandoraRoleId = request_context_1.requestContext.get('pandoraRoleId') || '';
|
|
62
|
+
const realIp = request_context_1.requestContext.get('realIp') || '';
|
|
62
63
|
try {
|
|
63
64
|
console.info(`准备发起ecommerce-trade-service请求[${requestId}]: ${url}, 参数: ${JSON.stringify(request)}`);
|
|
64
65
|
const response = await axios_1.default.post(url, request, {
|
|
@@ -67,6 +68,7 @@ async function callApi(url, request) {
|
|
|
67
68
|
'x-belink-pandora-userid': pandoraUserId,
|
|
68
69
|
'x-belink-userid': beLinkUserId,
|
|
69
70
|
'x-belink-pandora-roleid': pandoraRoleId,
|
|
71
|
+
'x-real-ip': realIp,
|
|
70
72
|
},
|
|
71
73
|
});
|
|
72
74
|
const responseData = response.data;
|