eprolo-cli 1.0.125 → 1.0.126

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.
Files changed (2) hide show
  1. package/bin/eprolo-cli.js +15 -2
  2. package/package.json +1 -1
package/bin/eprolo-cli.js CHANGED
@@ -303,6 +303,14 @@ async function insertProduct(arg) {
303
303
  }
304
304
  async function placeOrder(arg) {
305
305
 
306
+ }
307
+ // 修改订单地址
308
+ async function modifyOrderAddress(arg){
309
+ const config = readConfig();
310
+ const product = JSON.parse(arg);
311
+ const result = await postJsonWithRetry(BASE_URL + '/modify_order_address.html',product , config, "POST");
312
+ console.log(JSON.stringify(result, null, 2));
313
+ process.exit(0);
306
314
  }
307
315
  async function addOrder(arg) {
308
316
  const config = readConfig();
@@ -360,8 +368,9 @@ Usage:
360
368
  eprolo-cli product-list 查询产品列表
361
369
  eprolo-cli orders 查询订单列表
362
370
  eprolo-cli list 查询订单列表
363
- eprolo-cli add-order <order> 提交订单
364
- eprolo-cli insert-product <product> 插入产品
371
+ eprolo-cli add-order <order> 提交订单
372
+ eprolo-cli modify-order-address <order> 修改订单地址
373
+ eprolo-cli insert-product <product> 插入产品
365
374
  Authorization:
366
375
  框架通过 fieldInjection 把表单值递交给 CLI:
367
376
  userCode → env 通道 → process.env.EPROLO_USER_CODE
@@ -437,6 +446,10 @@ async function main() {
437
446
  if (argv[0] === "place-order" ) {
438
447
  await placeOrder(argv[1]);
439
448
  return;
449
+ }
450
+ if (argv[0] === "modify-order-address" ) {
451
+ await modifyOrderAddress(argv[1]);
452
+ return;
440
453
  }
441
454
  printHelp();
442
455
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.125",
3
+ "version": "1.0.126",
4
4
  "description": "CLI for Dianxiaobao ICBU AI publishing, authorization profile management, task submission, and task status checks.",
5
5
  "bin": {
6
6
  "eprolo": "bin/eprolo-cli.js"