优化
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lxk0301 https://gitee.com/lxk0301
|
||||
* @Date: 2020-11-01 16:25:41
|
||||
* @Last Modified by: lxk0301
|
||||
* @Last Modified time: 2021-03-14 15:25:41
|
||||
* @Last Modified time: 2021-03-29 15:25:41
|
||||
*/
|
||||
/*
|
||||
京东资产变动通知脚本:https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js
|
||||
@@ -59,7 +59,7 @@ if ($.isNode()) {
|
||||
$.message = '';
|
||||
$.balance = 0;
|
||||
$.expiredBalance = 0;
|
||||
await TotalBean();
|
||||
// await TotalBean();
|
||||
console.log(`\n********开始【京东账号${$.index}】${$.nickName || $.UserName}******\n`);
|
||||
if (!$.isLogin) {
|
||||
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
|
||||
@@ -104,7 +104,7 @@ async function bean() {
|
||||
let page = 1, t = 0, yesterdayArr = [];
|
||||
do {
|
||||
let response = await getJingBeanBalanceDetail(page);
|
||||
console.log(`第${page}页: ${JSON.stringify(response)}`);
|
||||
// console.log(`第${page}页: ${JSON.stringify(response)}`);
|
||||
if (response && response.code === "0") {
|
||||
page++;
|
||||
let detailList = response.detailList;
|
||||
@@ -125,6 +125,13 @@ async function bean() {
|
||||
$.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`);
|
||||
t = 1;
|
||||
}
|
||||
} else if (response && response.code === "3") {
|
||||
console.log(`cookie已过期,或者填写不规范,跳出`)
|
||||
t = 1;
|
||||
} else {
|
||||
console.log(`未知情况:${JSON.stringify(response)}`);
|
||||
console.log(`未知情况,跳出`)
|
||||
t = 1;
|
||||
}
|
||||
} while (t === 0);
|
||||
for (let item of yesterdayArr) {
|
||||
|
Reference in New Issue
Block a user