eprolo-cli 1.0.124 → 1.0.125

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 +14 -3
  2. package/package.json +1 -1
package/bin/eprolo-cli.js CHANGED
@@ -209,9 +209,13 @@ async function queryProductId(productId) {
209
209
  console.log(JSON.stringify(data, null, 2));
210
210
  process.exit(0);
211
211
  }
212
- async function queryProductList() {
212
+ async function queryProductList(title) {
213
+ let params = {title: title,page:1,limitSize:10};
214
+ if (title) {
215
+ params.title=title;
216
+ }
213
217
  const config = readConfig();
214
- const data = await postJsonWithRetry(BASE_URL+"/product_list.html", {page_index: 0, page_size: 10}, config, "GET");
218
+ const data = await postJsonWithRetry("https://eprolo.com/app/getProductByCatId.html", params, config, "GET");
215
219
  console.log(JSON.stringify(data, null, 2));
216
220
  process.exit(0);
217
221
  }
@@ -296,6 +300,9 @@ async function insertProduct(arg) {
296
300
  })
297
301
  });
298
302
  process.exit(0);
303
+ }
304
+ async function placeOrder(arg) {
305
+
299
306
  }
300
307
  async function addOrder(arg) {
301
308
  const config = readConfig();
@@ -416,7 +423,7 @@ async function main() {
416
423
  return;
417
424
  }
418
425
  if (argv[0] === "product-list" ) {
419
- await queryProductList();
426
+ await queryProductList(argv[1]);
420
427
  return;
421
428
  }
422
429
  if (argv[0] === "insert-product" ) {
@@ -427,6 +434,10 @@ async function main() {
427
434
  await addOrder(argv[1]);
428
435
  return;
429
436
  }
437
+ if (argv[0] === "place-order" ) {
438
+ await placeOrder(argv[1]);
439
+ return;
440
+ }
430
441
  printHelp();
431
442
  }
432
443
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.124",
3
+ "version": "1.0.125",
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"