mirror of
https://github.com/shufflewzc/faker3.git
synced 2026-04-03 16:34:07 +08:00
1
This commit is contained in:
10
jd_mhtask.js
10
jd_mhtask.js
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user