This commit is contained in:
Faker
2022-08-01 11:20:13 +08:00
parent bebe8c9e0d
commit 5f5ceabf81
29 changed files with 1933 additions and 2791 deletions

View File

@@ -10,7 +10,7 @@ const notify = $.isNode() ? require('./sendNotify') : '';
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
//Node.js用户请在jdCookie.js处填写京东ck;
//IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [], cookie = '', message;
let cookiesArr = [], cookie = '', message = '', allMessage = '';
let jd_mhurlList = '';
let jd_mhurlArr = [];
let jd_mhurl = '';
@@ -41,7 +41,7 @@ if ($.isNode()) {
$.nickName = '';
$.beans = 0
message = '';
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/`, {"open-url": "https://bean.m.jd.com/"});
@@ -65,7 +65,7 @@ if ($.isNode()) {
if (allMessage) {
if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`);
$.msg($.name, '', allMessage);
}
}
})()
.catch((e) => {
$.log('', `${$.name}, 失败! 原因: ${e}!`, '')
@@ -159,9 +159,13 @@ function doTask(taskId) {
console.log(`${$.name} API请求失败请检查网路重试`)
} else {
data = JSON.parse(data.match(/query\((.*)\n/)[1])
if (data.errcode === 8004) {
console.log(`任务完成失败无效任务ID`)
} else {
if (data.data.complete_task_list.includes(taskId)) {
console.log(`任务完成成功,当前幸运值${data.data.curbless}`)
$.userInfo.bless = data.data.curbless
}
}
}
} catch (e) {