mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-04-23 04:44:23 +08:00
1
This commit is contained in:
File diff suppressed because one or more lines are too long
+2
-1
@@ -55,7 +55,8 @@ class UserClass extends BasicClass {
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
for(let task of (result?.content?.taskInfoList||[]).filter(x => x.taskReachNum < x.taskNeedReachNum && x.triggerType==1)) {
|
||||
//console.log(JSON.stringify(result?.content?.taskInfoList))
|
||||
for(let task of (result?.content?.taskInfoList||[]).filter(x => x.taskReachNum < x.taskNeedReachNum && x.triggerType==1 && !x.taskTitle.includes('加购'))) {
|
||||
await this.reachTaskInfo(task);
|
||||
await $.wait(1000);
|
||||
break;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -31,7 +31,7 @@ if ($.isNode()) {
|
||||
$.isLogin = true;
|
||||
$.nickName = '';
|
||||
$.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
|
||||
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" });
|
||||
@@ -51,6 +51,7 @@ async function main() {
|
||||
$.runFlag = false;
|
||||
$.activityInfo = {};
|
||||
await takeRequest('showStarGiftInfo');
|
||||
|
||||
if ($.bizCode == 'MP001') {
|
||||
console.log(`本期活动结束,等待下期。。。`);
|
||||
$.flag = true
|
||||
@@ -60,6 +61,10 @@ async function main() {
|
||||
console.log(`获取活动详情失败`);
|
||||
return;
|
||||
}
|
||||
if ($.activityInfo.userLogin == 0) {
|
||||
console.log(`未登录`);
|
||||
return;
|
||||
}
|
||||
console.log(`获取活动详情成功`);
|
||||
$.activityId = $.activityInfo.activityBaseInfo.activityId;
|
||||
$.activityName = $.activityInfo.activityBaseInfo.activityName;
|
||||
|
||||
Reference in New Issue
Block a user