eprolo-cli 1.0.28 → 1.0.30
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 -4
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -6,7 +6,7 @@ const os = require("os");
|
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const https = require("https");
|
|
8
8
|
|
|
9
|
-
const VERIFY_URL = "https://wixtest.eprolo.com
|
|
9
|
+
const VERIFY_URL = "https://wixtest.eprolo.com/v1/auth/verify-code";
|
|
10
10
|
const CONFIG_DIR = path.join(os.homedir(), ".dxb-toolkit");
|
|
11
11
|
const CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
|
|
12
12
|
|
|
@@ -140,11 +140,11 @@ async function login(argv) {
|
|
|
140
140
|
// 调用 verify-code 接口校验密文
|
|
141
141
|
let verifyResult;
|
|
142
142
|
try {
|
|
143
|
-
verifyResult = await postJson(VERIFY_URL, { userCode });
|
|
143
|
+
verifyResult = await postJson(VERIFY_URL, { 'openApiKey':userCode });
|
|
144
144
|
} catch (err) {
|
|
145
145
|
console.error(JSON.stringify({
|
|
146
146
|
success: false,
|
|
147
|
-
errorMessage: "
|
|
147
|
+
errorMessage: "密文无效或已吊销请到账号设置页重新复制",
|
|
148
148
|
detail: err.message,
|
|
149
149
|
response: err.response || null
|
|
150
150
|
}, null, 2));
|
|
@@ -152,7 +152,7 @@ async function login(argv) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// 校验成功,写凭据文件
|
|
155
|
-
const account = accountAlias || verifyResult.
|
|
155
|
+
const account = accountAlias || verifyResult.accessToken || defaultShop || "unknown";
|
|
156
156
|
const config = {
|
|
157
157
|
account, // 顶层明文,框架读它做卡片标签
|
|
158
158
|
userCode,
|
package/package.json
CHANGED