Skip to content

Commit

Permalink
feat(yi_jing_tong): 创建运单做额外处理
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Aug 2, 2024
1 parent 6c7ef55 commit bf4594f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/yi_jing_tong/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cn-international-express-sdk/yi_jing_tong",
"version": "0.1.0",
"version": "0.1.1",
"types": "./dist/types/index.d.ts",
"main": "./dist/lib/index.js",
"module": "./dist/es/index.js",
Expand Down Expand Up @@ -33,4 +33,4 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
}
11 changes: 7 additions & 4 deletions packages/yi_jing_tong/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ export class YiJingTong {
const url =
(this.config.base_url || 'http://www.eastsunrisewarehouse.com/hwc_api/') +
action;
const res = await postJSONRequest<T>(url, {
token: this.config.app_token,
...sendData,
});
const row = action.includes('add_order.php')
? sendData
: {
token: this.config.app_token,
...sendData,
};
const res = await postJSONRequest<T>(url, row);
return res;
}
}

0 comments on commit bf4594f

Please sign in to comment.