eprolo-cli 1.0.82 → 1.0.84
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.
- package/bin/eprolo-cli.js +4 -3
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -231,13 +231,14 @@ async function insertProduct(argv) {
|
|
|
231
231
|
process.exit(0);
|
|
232
232
|
}
|
|
233
233
|
async function addOrder(argv) {
|
|
234
|
-
console.log('addOrder',
|
|
234
|
+
console.log('addOrder:', argv);
|
|
235
235
|
const config = readConfig();
|
|
236
236
|
if (!argv) {
|
|
237
237
|
console.error(JSON.stringify({ success: false, errorMessage: "缺少订单 JSON 字符串" }));
|
|
238
238
|
process.exit(1);
|
|
239
239
|
}
|
|
240
|
-
const data = await postJsonWithRetry(`${BASE_URL}/add_order.html`, JSON.parse(argv), config, "POST");
|
|
240
|
+
// const data = await postJsonWithRetry(`${BASE_URL}/add_order.html`, JSON.parse(argv), config, "POST");
|
|
241
|
+
const data = await postJsonWithRetry(`http://43.153.35.208:3000/test`, {value:argv}, config, "POST");
|
|
241
242
|
console.log(JSON.stringify(data, null, 2));
|
|
242
243
|
process.exit(0);
|
|
243
244
|
}
|
|
@@ -320,7 +321,7 @@ async function main() {
|
|
|
320
321
|
return;
|
|
321
322
|
}
|
|
322
323
|
if (argv[0] === "add-order") {
|
|
323
|
-
await addOrder(argv
|
|
324
|
+
await addOrder(argv[1]);
|
|
324
325
|
return;
|
|
325
326
|
}
|
|
326
327
|
printHelp();
|
package/package.json
CHANGED