1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-04-23 04:44:23 +08:00
This commit is contained in:
2024
2024-04-22 09:53:40 +08:00
parent a26e88d6b7
commit b5a1200daf
4 changed files with 8 additions and 29 deletions
-12
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -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
+6 -1
View File
@@ -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;