KingRan 2022-02-18 10:08:06 +08:00
parent dea210ea44
commit f0edcbaea0
1 changed files with 7 additions and 3 deletions

View File

@ -27,7 +27,7 @@ const notify = $.isNode() ? require('./sendNotify') : '';
//Node.js用户请在jdCookie.js处填写京东ck; //Node.js用户请在jdCookie.js处填写京东ck;
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
let cookiesArr = [], cookie = '', message; let cookiesArr = [], cookie = '', message;
const linkIdArr = ["7ya6o83WSbNhrbYJqsMfFA","Eu7-E0CUzqYyhZJo9d3YkQ"]; const linkIdArr = ["Eu7-E0CUzqYyhZJo9d3YkQ"];
const signLinkId = '9WA12jYGulArzWS7vcrwhw'; const signLinkId = '9WA12jYGulArzWS7vcrwhw';
let linkId; let linkId;
if ($.isNode()) { if ($.isNode()) {
@ -40,13 +40,13 @@ if ($.isNode()) {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
} }
!(async () => { !(async () => {
console.log(`\n【如提示活动火爆,可再执行一次尝试】\n`);
if (!cookiesArr[0]) { if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
return; return;
} }
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) { if (cookiesArr[i]) {
console.log(`\n如提示活动火爆,可再执行一次尝试\n`);
cookie = cookiesArr[i]; cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1; $.index = i + 1;
@ -79,12 +79,15 @@ if ($.isNode()) {
async function jsRedPacket() { async function jsRedPacket() {
try { try {
$.openfan = true;
await invite2(); await invite2();
//await sign();//极速版签到提现 //await sign();//极速版签到提现
await reward_query(); await reward_query();
for (let i = 0; i < 3; ++i) { for (let i = 0; i < 3; ++i) {
if ($.openfan) {
await redPacket();//开红包 await redPacket();//开红包
await $.wait(2000) await $.wait(5000)
}
} }
await getPacketList();//领红包提现 await getPacketList();//领红包提现
await signPrizeDetailList(); await signPrizeDetailList();
@ -194,6 +197,7 @@ async function redPacket() {
console.log("获得优惠券") console.log("获得优惠券")
} }
} else { } else {
$.openfan = false;
console.log(data.errMsg) console.log(data.errMsg)
} }
} }