parent
4bb053bfb3
commit
896aeb91d7
|
@ -1,31 +1,28 @@
|
|||
/*
|
||||
种豆得豆 脚本更新地址:https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js
|
||||
更新时间:2021-08-20
|
||||
种豆得豆 脚本更新地址:https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js
|
||||
活动入口:京东APP我的-更多工具-种豆得豆
|
||||
已支持IOS京东多账号,云端多京东账号
|
||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||
注:会自动关注任务中的店铺跟商品,介意者勿使用。
|
||||
互助码shareCode请先手动运行脚本查看打印可看到
|
||||
每个京东账号每天只能帮助3个人。多出的助力码将会助力失败。
|
||||
|
||||
// zero205:已添加自己账号内部互助,有剩余助力次数再帮我助力
|
||||
|
||||
=====================================Quantumult X=================================
|
||||
[task_local]
|
||||
1 7-21/2 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true
|
||||
1 7-21/2 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true
|
||||
|
||||
=====================================Loon================================
|
||||
[Script]
|
||||
cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js,tag=京东种豆得豆
|
||||
cron "1 7-21/2 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js,tag=京东种豆得豆
|
||||
|
||||
======================================Surge==========================
|
||||
京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js
|
||||
京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js
|
||||
|
||||
====================================小火箭=============================
|
||||
京东种豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=3600, enable=true
|
||||
京东种豆得豆 = type=cron,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=3600, enable=true
|
||||
|
||||
搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_plantBean.js
|
||||
*/
|
||||
const $ = new Env('京东种豆得豆_内部互助');
|
||||
const $ = new Env('京东种豆得豆');
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
//ios等软件用户直接用NobyDa的jd cookie
|
||||
let jdNotify = true;//是否开启静默运行。默认true开启
|
||||
|
@ -44,6 +41,20 @@ let awardState = '';//上期活动的京豆是否收取
|
|||
let randomCount = $.isNode() ? 20 : 5;
|
||||
let num;
|
||||
$.newShareCode = [];
|
||||
|
||||
let NowHour = new Date().getHours();
|
||||
let llhelp=true;
|
||||
if ($.isNode() && process.env.CC_NOHELPAFTER8) {
|
||||
console.log(NowHour);
|
||||
if (process.env.CC_NOHELPAFTER8=="true"){
|
||||
if (NowHour>8){
|
||||
llhelp=false;
|
||||
console.log(`现在是9点后时段,不启用互助....`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
!(async () => {
|
||||
await requireConfig();
|
||||
if (!cookiesArr[0]) {
|
||||
|
@ -74,6 +85,7 @@ $.newShareCode = [];
|
|||
await showMsg();
|
||||
}
|
||||
}
|
||||
if(llhelp){
|
||||
for (let j = 0; j < cookiesArr.length; j++) {
|
||||
if (cookiesArr[j]) {
|
||||
cookie = cookiesArr[j];
|
||||
|
@ -83,6 +95,7 @@ $.newShareCode = [];
|
|||
await doHelp()
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($.isNode() && allMessage) {
|
||||
await notify.sendNotify(`${$.name}`, `${allMessage}`)
|
||||
}
|
||||
|
@ -271,16 +284,21 @@ async function doTask() {
|
|||
const { data } = $.shopTaskListRes;
|
||||
let goodShopListARR = [],moreShopListARR = [], shopList = [];
|
||||
const { goodShopList, moreShopList } = data;
|
||||
if (goodShopList) {
|
||||
for (let i of goodShopList) {
|
||||
if (i.taskState === '2') {
|
||||
goodShopListARR.push(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (moreShopList) {
|
||||
for (let j of moreShopList) {
|
||||
if (j.taskState === '2') {
|
||||
moreShopListARR.push(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shopList = goodShopListARR.concat(moreShopListARR);
|
||||
for (let shop of shopList) {
|
||||
const { shopId, shopTaskId } = shop;
|
||||
|
|
Loading…
Reference in New Issue