Skip to content

Commit 3fc18cc

Browse files
committed
sync
1 parent 4e39c4b commit 3fc18cc

3 files changed

Lines changed: 20 additions & 13 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
hostname = api.m.jd.com
22

3-
https://api.m.jd.com/client.action url script-request-body https://raw.githubusercontent.com/CenBoMin/GithubSync/main/JD/JDCC/cookie.js
3+
https://api.m.jd.com/client.action url script-request-body https://raw.githubusercontent.com/CenBoMin/GithubSync/main/JDDOG/JDCC/cookie.js
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ async function GetCookie() {
1919
const jdcctxcode = $request.body.split('"code":"')[1].split('"')[0];;
2020
$.setdata(jdcctxcode, 'jdcctxcode')
2121
$.log(`获取成功🎉: jdcctxcode: ${jdcctxcode}`)
22+
$.msg($.name, '', `更新code成功:${jdcctxcode}🎉`);
2223
}
2324

2425
}
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ if ($.isNode()) {
1818
const JD_API_HOST = 'https://api.m.jd.com/client.action';
1919

2020
!(async () => {
21-
if (!ccjdcoin) {
22-
$.msg($.name, "【提示】请先获取cookie");
23-
return;
24-
}
25-
21+
console.log(`本次的提现code为:${jdtxcode}`);
2622
for (let i = 0; i < cookiesArr.length; i++) {
2723
if (cookiesArr[i]) {
2824
cookie = cookiesArr[i];
@@ -41,10 +37,9 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
4137
}
4238
continue
4339
}
44-
//await requireConfig()
45-
await getCash()
46-
47-
40+
for (let k = 0; k < 100; k++) {
41+
await getCash();
42+
}
4843

4944
}
5045
}
@@ -53,6 +48,7 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
5348
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
5449
})
5550
.finally(() => {
51+
$.msg($.name, '', `🗣请重新获取新的提现code`);
5652
$.done();
5753
})
5854

@@ -67,9 +63,19 @@ function getCash() {
6763
} else {
6864
if (safeGet(data)) {
6965
console.log(`提现结果${data}`);
70-
data = JSON.parse(data);
71-
if (data['bizMsg'] == "活动太火爆呀~") {
72-
console.log(data['data']['desc'])
66+
const code = data.data.bizCode
67+
switch (code) {
68+
case -525:
69+
console.log("提现失败!❌");
70+
break;
71+
case -524:
72+
console.log("提现失败!❌");
73+
break;
74+
default:
75+
console.log(`**** getCash *****\n`);
76+
$.log(`\n‼️${resp.statusCode}[调试log]:${resp.body}`);
77+
$.msg($.name, '', `城城提现成功🎉:${code}`);
78+
7379
}
7480
}
7581
}

0 commit comments

Comments
 (0)