Merge pull request #13 from lxk0301/master

Master
This commit is contained in:
shylocks
2020-12-15 20:41:46 +08:00
committed by GitHub
45 changed files with 144 additions and 94 deletions

View File

@@ -90,9 +90,6 @@ http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\
# 小米运动获取Token
http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token
# 苹果抽奖机
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js,tag=苹果抽奖机
# 京东代属
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
@@ -111,5 +108,9 @@ cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
# 京东直播
cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播
#直播红包雨
cron "0 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨
# 金融打卡领年终奖
cron "10 6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖
cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖
# 健康抽奖机
cron "10 0 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机

View File

@@ -29,9 +29,10 @@
"20 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_car.png",
"10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png",
"30 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ds.png",
"10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js, tag=苹果抽奖机, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png",
"30 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, tag=健康抽奖机, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png",
"10-20/5 12 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png",
"10 12 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=京东金融打卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png",
"0 0,20,9-23/2 15-31 12 * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png",
"10 12 1-31 12 * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=京东金融打卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png",
"15 17 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png"
]
}

View File

@@ -12,7 +12,7 @@
#东东农场
cron "40 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,timeout=530, wake-system=1, tag=东东农场
#东东萌宠
cron "20 7-19/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠
cron "20 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠
#京东种豆得豆
cron "50 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,timeout=630, wake-system=1, tag=京东种豆得豆
#宠汪汪
@@ -61,9 +61,15 @@ cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
cron "30 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车
#京东快递签到
cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, timeout=750, wake-system=1, tag=京东快递签到
#京东直播
#京东直播(活动结束时间未知)
cron "20 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, timeout=750, wake-system=1, tag=京东直播
#秒杀红包雨
cron "20 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, timeout=750, wake-system=1, tag=秒杀红包雨
#以下为短期活动
#金融打卡领年终奖
cron "30 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, timeout=750, wake-system=1, tag=金融打卡领年终奖
cron "30 7 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, timeout=750, wake-system=1, tag=金融打卡领年终奖
#健康抽奖机
cron "30 2 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, timeout=750, wake-system=1, tag=健康抽奖机
#直播红包雨(2020-12-31活动结束)
cron "0 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, timeout=750, wake-system=1, tag=直播红包雨
#秒杀红包雨(2020-12-31活动结束)
cron "20 9 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, timeout=750, wake-system=1, tag=秒杀红包雨

View File

@@ -926,7 +926,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -411,7 +411,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -418,7 +418,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -661,7 +661,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -508,7 +508,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -306,7 +306,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -396,7 +396,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -5,11 +5,13 @@
##############短期活动##############
# 秒杀红包雨(2020.12.31活动过期)
40 8 * * * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
40 8 1-31 12 * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
# 健康抽奖机(2020.12.31活动过期)
10 0 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
# 苹果超品日互动抽奖机(2020.12.14活动过期)
8 0,20 * * * node /scripts/jd_apple_live.js >> /scripts/logs/jd_apple_live.log 2>&1
10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
# 直播红包雨(2020.12.31活动过期)
0 0,20,9-23/2 15-31 12 * node /scripts/jd_live_redrain.js >> /scripts/logs/jd_live_redrain.log 2>&1
# 京东金融打卡领年终奖(2020.12.31活动过期)
10 6 1-31 12 * node /scripts/jr_sign.js >> /scripts/logs/jr_sign.log 2>&1
##############长期活动##############
# 签到
@@ -74,5 +76,3 @@
33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1
# 京东直播(每日18豆)
10-20/5 11 * * * node /scripts/jd_live.js >> /scripts/logs/jd_live.log 2>&1
# 京东金融签到
10 6 * * * node /scripts/jr_sign.js >> /scripts/logs/jr_sign.log 2>&1

View File

@@ -5,11 +5,13 @@
##############短期活动##############
# 秒杀红包雨(2020.12.31活动过期)
40 8 * * * node /scripts/jd_ms_redrain.js | ts >> /scripts/logs/jd_ms_redrain.log 2>&1
40 8 1-31 12 * node /scripts/jd_ms_redrain.js | ts >> /scripts/logs/jd_ms_redrain.log 2>&1
# 健康抽奖机(2020.12.31活动过期)
10 0 * * * node /scripts/jd_health.js | ts >> /scripts/logs/jd_health.log 2>&1
# 苹果超品日互动抽奖机(2020.12.14活动过期)
8 0,20 * * * node /scripts/jd_apple_live.js | ts >> /scripts/logs/jd_apple_live.log 2>&1
10 0 1-31 12 * node /scripts/jd_health.js | ts >> /scripts/logs/jd_health.log 2>&1
# 直播红包雨(2020.12.31活动过期)
0 0,20,9-23/2 15-31 12 * node /scripts/jd_live_redrain.js | ts >> /scripts/logs/jd_live_redrain.log 2>&1
# 京东金融打卡领年终奖(2020.12.31活动过期)
10 6 1-31 12 * node /scripts/jr_sign.js | ts >> /scripts/logs/jr_sign.log 2>&1
##############长期活动##############
# 签到
@@ -74,5 +76,3 @@
33 4 * * * node /scripts/jd_bean_home.js | ts >> /scripts/logs/jd_bean_home.log 2>&1
# 京东直播(每日18豆)
10-20/5 11 * * * node /scripts/jd_live.js | ts >> /scripts/logs/jd_live.log 2>&1
# 京东金融签到
10 6 * * * node /scripts/jr_sign.js | ts >> /scripts/logs/jr_sign.log 2>&1

View File

@@ -8,7 +8,7 @@
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
let FruitShareCodes = [
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6',//账号一的好友shareCode,不同好友中间用@符号隔开
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开
'6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode不同好友中间用@符号隔开
]
// 判断github action里面是否有水果互助码

View File

@@ -212,7 +212,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -453,7 +453,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -1,7 +1,7 @@
/*
京小超兑换奖品 脚本地址https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js
感谢@yangtingxiao提供PR
更新时间2020-11-23
更新时间2020-12-15
支持京东多个账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
======================quantumultx===============
@@ -337,24 +337,27 @@ function smtgHome() {
}
//通知
async function msgShow() {
function msgShow() {
// $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【收取蓝币】${$.coincount ? `${$.coincount}个` : $.coinerr }${coinToBeans ? `\n【兑换京豆】${ $.beanscount ? `${$.beanscount}个` : $.beanerr}` : ""}`);
$.log(`\n【京东账号${$.index}${$.nickName}\n${coinToBeans ? `【兑换${$.title}${$.beanscount ? `成功` : $.beanerr}` : "您设置的是不兑换奖品"}\n`);
let ctrTemp;
if ($.isNode() && process.env.MARKET_REWARD_NOTIFY) {
ctrTemp = `${process.env.MARKET_REWARD_NOTIFY}` === 'false';
} else if ($.getdata('jdSuperMarketRewardNotify')) {
ctrTemp = $.getdata('jdSuperMarketRewardNotify') === 'false';
} else {
ctrTemp = `${jdNotify}` === 'false';
}
//默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗
if ($.beanscount && ctrTemp) {
$.msg($.name, ``, `【京东账号${$.index}${$.nickName}\n${coinToBeans ? `【兑换${$.title}${ $.beanscount ? `成功,数量:${$.beanscount}` : $.beanerr}` : "您设置的是不兑换奖品"}`);
if ($.isNode()) {
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}${$.UserName}\n${coinToBeans ? `【兑换${$.title}${$.beanscount ? `成功,数量:${$.beanscount}` : $.beanerr}` : "您设置的是不兑换奖品"}`)
return new Promise(async resolve => {
$.log(`\n【京东账号${$.index}${$.nickName}\n${coinToBeans ? `【兑换${$.title}${$.beanscount ? `成功` : $.beanerr}` : "您设置的是不兑换奖品"}\n`);
let ctrTemp;
if ($.isNode() && process.env.MARKET_REWARD_NOTIFY) {
ctrTemp = `${process.env.MARKET_REWARD_NOTIFY}` === 'false';
} else if ($.getdata('jdSuperMarketRewardNotify')) {
ctrTemp = $.getdata('jdSuperMarketRewardNotify') === 'false';
} else {
ctrTemp = `${jdNotify}` === 'false';
}
}
//默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗
if ($.beanscount && ctrTemp) {
$.msg($.name, ``, `【京东账号${$.index}${$.nickName}\n${coinToBeans ? `【兑换${$.title}${ $.beanscount ? `成功,数量:${$.beanscount}` : $.beanerr}` : "您设置的是不兑换奖品"}`);
if ($.isNode()) {
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}${$.UserName}\n${coinToBeans ? `【兑换${$.title}${$.beanscount ? `成功,数量:${$.beanscount}` : $.beanerr}` : "您设置的是不兑换奖品"}`)
}
}
resolve()
})
}
function TotalBean() {
return new Promise(async resolve => {
@@ -425,7 +428,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -327,7 +327,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -387,7 +387,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -232,7 +232,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -347,7 +347,8 @@ function hireAward(date, type = 0) {
})
}
async function helpFriends() {
if ($.canHelpFlag) {
let Hours = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours();
if ($.canHelpFlag && Hours >= 6) {
await shareCodesFormat();
for (let code of $.newShareCodes) {
if (code) {
@@ -1460,7 +1461,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -205,7 +205,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -1,6 +1,6 @@
/*
东东水果:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js
更新时间2020-11-30
更新时间2020-12-15
东东农场活动链接https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -29,7 +29,7 @@ let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, n
//下面给出两个账号的填写示例iOS只支持2个京东账号
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
//账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6',
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',
//账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',
]
@@ -725,6 +725,14 @@ async function clockInIn() {
}
}
}
if ($.clockInInit.todaySigned && $.clockInInit.totalSigned === 7) {
console.log('开始领取--惊喜礼包38g水滴');
await gotClockInGift();
if ($.gotClockInGiftRes.code === '0') {
// message += `【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`;
console.log(`【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`);
}
}
// 限时关注得水滴
if ($.clockInInit.themes && $.clockInInit.themes.length > 0) {
for (let item of $.clockInInit.themes) {

View File

@@ -393,7 +393,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -749,7 +749,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -821,7 +821,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -192,7 +192,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -281,7 +281,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -407,7 +407,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

File diff suppressed because one or more lines are too long

View File

@@ -204,7 +204,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -303,7 +303,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -2,30 +2,30 @@
直播红包雨
每天0,9,11,13,15,17,19,20,21,23可领每日上限未知
活动时间2020-12-14 2020-12-31
更新地址https://raw.githubusercontent.com/lxk0301/jd_scripts/master/activity/jd_live_redrain.js
更新地址https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js
已支持IOS双京东账号, Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, 小火箭JSBox, Node.js
============Quantumultx===============
[task_local]
#直播红包雨
0 0,9,11,13,15,17,19,20,21,23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/activity/jd_live_redrain.js, tag=直播红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true
0 0,9,11,13,15,17,19,20,21,23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true
================Loon==============
[Script]
cron "0 0,9,11,13,15,17,19,20,21,23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/activity/jd_live_redrain.js, tag=直播红包雨
cron "0 0,9,11,13,15,17,19,20,21,23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨
===============Surge=================
直播红包雨 = type=cron,cronexp="0 0,9,11,13,15,17,19,20,21,23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/activity/jd_live_redrain.js
直播红包雨 = type=cron,cronexp="0 0,9,11,13,15,17,19,20,21,23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js
============小火箭=========
直播红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/activity/jd_live_redrain.js, cronexpr="0 0,9,11,13,15,17,19,20,21,23 * * *", timeout=200, enable=true
直播红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, cronexpr="0 0,9,11,13,15,17,19,20,21,23 * * *", timeout=200, enable=true
*/
const $ = new Env('直播红包雨');
const notify = $.isNode() ? require('../sendNotify') : '';
const notify = $.isNode() ? require('./sendNotify') : '';
//Node.js用户请在jdCookie.js处填写京东ck;
const jdCookieNode = $.isNode() ? require('../jdCookie.js') : '';
let jdNotify = false;//是否关闭通知false打开通知推送true关闭通知推送
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
let jdNotify = true;//是否关闭通知false打开通知推送true关闭通知推送
//IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [], cookie = '', message;
if ($.isNode()) {
@@ -34,6 +34,24 @@ if ($.isNode()) {
})
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {
};
process.env.TZ = "Asia/Shanghai";
Date.prototype.TimeZone = new Map([
['Asia/Shanghai',+8],
])
Date.prototype.zoneDate = function(){
if(process.env.TZ === undefined){
return new Date();
}else{
for (let item of this.TimeZone.entries()) {
if(item[0] === process.env.TZ){
let d = new Date();
d.setHours(d.getHours()+item[1]);
return d;
}
}
return new Date();
}
}
} else {
let cookiesData = $.getdata('CookiesJD') || "[]";
cookiesData = jsonParse(cookiesData);
@@ -50,8 +68,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
}
await getRedRain();
if(!$.activityId) return
let nowTs = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000
message = `${new Date($.st).getHours()}点红包雨】`
let nowTs = new Date().getTime()
if (!($.st <= nowTs && nowTs < $.ed)) {
console.log(`不在红包雨时间之内`)
return
@@ -63,6 +80,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
$.index = i + 1;
$.isLogin = true;
$.nickName = '';
message = `${new Date($.st).getHours()}${$.name}`
await TotalBean();
console.log(`\n******开始【京东账号${$.index}${$.nickName || $.UserName}*********\n`);
if (!$.isLogin) {
@@ -100,7 +118,7 @@ async function showMsg() {
function getRedRain() {
return new Promise(resolve => {
$.get({
url: "http://ql4kk90rw.hb-bkt.clouddn.com/jd_live_redRain.json",
url: "http://ql4kk90rw.hb-bkt.clouddn.com/jd_live_redRain.json?" + Date.now(),
}, (err, resp, data) => {
try {
if (err) {
@@ -160,7 +178,7 @@ function receiveRedRain() {
function taskUrl(function_id, body = {}) {
return {
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime()}`,
headers: {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
@@ -233,7 +251,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -121,7 +121,8 @@ function user_info() {
// message += `【我的金币数量】${userInfo.treeInfo.coin}\n`;
// message += `【距离${userInfo.treeInfo.level + 1}级摇钱树还差】${userInfo.treeInfo.progressLeft}\n`;
} else {
$.msg($.name, `【提示】京东账号${$.index}${$.UserName}运行失败`, '此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证', {"open-url": "openApp.jdMobile://"});
$.log(`京东账号${$.index}${$.UserName}运行失败\n此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证`)
// $.msg($.name, `【提示】京东账号${$.index}${$.UserName}运行失败`, '此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证', {"open-url": "openApp.jdMobile://"});
}
}
} else {
@@ -654,7 +655,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -194,7 +194,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -354,7 +354,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -32,7 +32,7 @@ let shareCodes = [ // IOS本地脚本用户这个列表填入你要助力的好
//账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
'MTAxODc2NTEzNTAwMDAwMDAwMjg3MDg2MA==@MTAxODc2NTEzMzAwMDAwMDAyNzUwMDA4MQ==@MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODc2NTEzNDAwMDAwMDAzMDI2MDI4MQ==@MTAxODcxOTI2NTAwMDAwMDAxOTQ3MjkzMw==',
//账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==',
'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==@MTE1NDUyMjEwMDAwMDAwNDI0MDM2MDc=',
]
let message = '', subTitle = '', option = {};
let jdNotify = false;//是否关闭通知false打开通知推送true关闭通知推送

View File

@@ -676,7 +676,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -326,7 +326,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -211,7 +211,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -893,7 +893,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -523,7 +523,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -1457,7 +1457,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -209,7 +209,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -342,7 +342,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}

View File

@@ -184,7 +184,7 @@ function jsonParse(str) {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}