2
.github/workflows/deploy_tencent_scf.yml
vendored
2
.github/workflows/deploy_tencent_scf.yml
vendored
@@ -45,6 +45,7 @@ jobs:
|
|||||||
if [ $JOY_FEED_COUNT ]; then sed -i "/variables/a\ JOY_FEED_COUNT: $JOY_FEED_COUNT" serverless.yml; fi;
|
if [ $JOY_FEED_COUNT ]; then sed -i "/variables/a\ JOY_FEED_COUNT: $JOY_FEED_COUNT" serverless.yml; fi;
|
||||||
if [ $JOY_HELP_FEED ]; then sed -i "/variables/a\ JOY_HELP_FEED: $JOY_HELP_FEED" serverless.yml; fi;
|
if [ $JOY_HELP_FEED ]; then sed -i "/variables/a\ JOY_HELP_FEED: $JOY_HELP_FEED" serverless.yml; fi;
|
||||||
if [ $JOY_RUN_FLAG ]; then sed -i "/variables/a\ JOY_RUN_FLAG: $JOY_RUN_FLAG" serverless.yml; fi;
|
if [ $JOY_RUN_FLAG ]; then sed -i "/variables/a\ JOY_RUN_FLAG: $JOY_RUN_FLAG" serverless.yml; fi;
|
||||||
|
if [ $JOY_TEAM_LEVEL ]; then sed -i "/variables/a\ JOY_TEAM_LEVEL: $JOY_TEAM_LEVEL" serverless.yml; fi;
|
||||||
if [ $JD_JOY_REWARD_NAME ]; then sed -i "/variables/a\ JD_JOY_REWARD_NAME: $JD_JOY_REWARD_NAME" serverless.yml; fi;
|
if [ $JD_JOY_REWARD_NAME ]; then sed -i "/variables/a\ JD_JOY_REWARD_NAME: $JD_JOY_REWARD_NAME" serverless.yml; fi;
|
||||||
if [ $MARKET_COIN_TO_BEANS ]; then sed -i "/variables/a\ MARKET_COIN_TO_BEANS: $MARKET_COIN_TO_BEANS" serverless.yml; fi;
|
if [ $MARKET_COIN_TO_BEANS ]; then sed -i "/variables/a\ MARKET_COIN_TO_BEANS: $MARKET_COIN_TO_BEANS" serverless.yml; fi;
|
||||||
if [ $MARKET_REWARD_NOTIFY ]; then sed -i "/variables/a\ MARKET_REWARD_NOTIFY: $MARKET_REWARD_NOTIFY" serverless.yml; fi;
|
if [ $MARKET_REWARD_NOTIFY ]; then sed -i "/variables/a\ MARKET_REWARD_NOTIFY: $MARKET_REWARD_NOTIFY" serverless.yml; fi;
|
||||||
@@ -86,6 +87,7 @@ jobs:
|
|||||||
JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT}}
|
JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT}}
|
||||||
JOY_HELP_FEED: ${{ secrets.JOY_HELP_FEED}}
|
JOY_HELP_FEED: ${{ secrets.JOY_HELP_FEED}}
|
||||||
JOY_RUN_FLAG: ${{ secrets.JOY_RUN_FLAG}}
|
JOY_RUN_FLAG: ${{ secrets.JOY_RUN_FLAG}}
|
||||||
|
JOY_TEAM_LEVEL: ${{ secrets.JOY_TEAM_LEVEL}}
|
||||||
JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME}}
|
JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME}}
|
||||||
MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS}}
|
MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS}}
|
||||||
MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY}}
|
MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY}}
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/.idea
|
/.idea
|
||||||
/index.js
|
|
||||||
/.history
|
/.history
|
||||||
/box.dat
|
/box.dat
|
||||||
/CookieSet.json
|
/CookieSet.json
|
||||||
|
/jdCookie.js
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
"id": "QQ_READ",
|
"id": "QQ_READ",
|
||||||
"name": "企鹅阅读(QQ小程序)",
|
"name": "企鹅阅读(QQ小程序)",
|
||||||
"keys": [
|
"keys": [
|
||||||
"qqreadurl",
|
|
||||||
"qqreadhd",
|
"qqreadhd",
|
||||||
"qqreadtimeurl",
|
"qqreadtimeurl",
|
||||||
"qqreadtimehd"
|
"qqreadtimehd"
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ let qqreadtimeheaderVal = $.getdata(qqreadtimeheaderKey)
|
|||||||
let QQ_READ_COOKIES = [
|
let QQ_READ_COOKIES = [
|
||||||
{
|
{
|
||||||
qqreadurlVal,
|
qqreadurlVal,
|
||||||
"qqreadheaderVal": "",
|
"qqreadheaderVal": ``,
|
||||||
"qqreadtimeurlVal": "",
|
"qqreadtimeurlVal": ``,
|
||||||
"qqreadtimeheaderVal": ""
|
"qqreadtimeheaderVal": ``
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
function getNodeCookie() {
|
function getNodeCookie() {
|
||||||
@@ -185,7 +185,7 @@ function GetCookie() {
|
|||||||
// if (qqreadbodyVal) $.setdata(qqreadbodyVal, qqreadbodyKey)
|
// if (qqreadbodyVal) $.setdata(qqreadbodyVal, qqreadbodyKey)
|
||||||
// $.log(`[${jsname}] 获取阅读: 成功,qqreadbodyVal: ${qqreadbodyVal}`)
|
// $.log(`[${jsname}] 获取阅读: 成功,qqreadbodyVal: ${qqreadbodyVal}`)
|
||||||
|
|
||||||
$.setdata(qqreadurlVal, qqreadurlKey);
|
// $.setdata(qqreadurlVal, qqreadurlKey);
|
||||||
const qqreadheaderVal = JSON.stringify($request.headers)
|
const qqreadheaderVal = JSON.stringify($request.headers)
|
||||||
if (qqreadheaderVal) $.setdata(qqreadheaderVal, qqreadheaderKey)
|
if (qqreadheaderVal) $.setdata(qqreadheaderVal, qqreadheaderKey)
|
||||||
$.log(`[${jsname}] 获取Cookie: 成功,qqreadheaderVal: ${qqreadheaderVal}`)
|
$.log(`[${jsname}] 获取Cookie: 成功,qqreadheaderVal: ${qqreadheaderVal}`)
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
|
|
||||||
|
|
||||||
##############短期活动##############
|
##############短期活动##############
|
||||||
# 暂无
|
# 京喜故事(2020.12.12活动过期)
|
||||||
|
10 * * * * node /scripts/jd_jxstory.js >> /scripts/logs/jd_jxstory.log 2>&1
|
||||||
|
# 金榜年终奖(2020.12.12活动过期)
|
||||||
|
10 7 * * * node /scripts/jd_split.js >> /scripts/logs/jd_split.log 2>&1
|
||||||
##############长期活动##############
|
##############长期活动##############
|
||||||
|
|
||||||
# 签到
|
# 签到
|
||||||
@@ -62,4 +63,6 @@
|
|||||||
# 东东工厂
|
# 东东工厂
|
||||||
36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1
|
36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1
|
||||||
#十元街
|
#十元街
|
||||||
36 8 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
|
36 8 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
|
||||||
|
#秒杀红包雨
|
||||||
|
40 8 * * * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
|
|
||||||
|
|
||||||
##############短期活动##############
|
##############短期活动##############
|
||||||
# 暂无
|
# 京喜故事(2020.12.12活动过期)
|
||||||
|
10 * * * * node /scripts/jd_jxstory.js |ts >> /scripts/logs/jd_jxstory.log 2>&1
|
||||||
|
# 金榜年终奖(2020.12.12活动过期)
|
||||||
|
10 7 * * * node /scripts/jd_split.js |ts >> /scripts/logs/jd_split.log 2>&1
|
||||||
##############长期活动##############
|
##############长期活动##############
|
||||||
|
|
||||||
# 签到
|
# 签到
|
||||||
@@ -62,4 +63,6 @@
|
|||||||
# 东东工厂
|
# 东东工厂
|
||||||
36 * * * * node /scripts/jd_jdfactory.js |ts >> /scripts/logs/jd_jdfactory.log 2>&1
|
36 * * * * node /scripts/jd_jdfactory.js |ts >> /scripts/logs/jd_jdfactory.log 2>&1
|
||||||
#十元街
|
#十元街
|
||||||
36 8 * * * node /scripts/jd_syj.js |ts >> /scripts/logs/jd_syj.log 2>&1
|
36 8 * * * node /scripts/jd_syj.js |ts >> /scripts/logs/jd_syj.log 2>&1
|
||||||
|
#秒杀红包雨
|
||||||
|
40 8 * * * node /scripts/jd_ms_redrain.js |ts >> /scripts/logs/jd_ms_redrain.log 2>&1
|
||||||
|
|||||||
@@ -96,7 +96,8 @@
|
|||||||
| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制jd_818.js脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) |
|
| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制jd_818.js脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) |
|
||||||
| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制jd_joy_feedPets.js脚本喂食数量 ,可以填的数字10,20,40,80 , 其他数字不可. |
|
| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制jd_joy_feedPets.js脚本喂食数量 ,可以填的数字10,20,40,80 , 其他数字不可. |
|
||||||
| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制jd_joy_steal.js脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) |
|
| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制jd_joy_steal.js脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) |
|
||||||
| `JOY_RUN_FLAG` | 宠汪汪参加双人赛跑 | 非必须 | 控制jd_joy.js脚本是否参加双人赛跑,`false`为否,`true`为是,脚本默认是`true` |
|
| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制jd_joy.js脚本是否参加赛跑(默认参加双人赛跑),`false`为否,`true`为是,脚本默认是`true` |
|
||||||
|
| `JOY_TEAM_LEVEL` | 宠汪汪参加什么级别的赛跑 | 非必须 | 控制jd_joy.js脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效) |
|
||||||
| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 |
|
| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 |
|
||||||
| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制jd_blueCoin.js兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` |
|
| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制jd_blueCoin.js兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` |
|
||||||
| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制jd_blueCoin.js兑换奖品成功后是否静默运行, `false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制jd_blueCoin.js兑换奖品成功后是否静默运行, `false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
金榜年终奖互助码
|
|
||||||
此文件为Node.js专用。其他用户请忽略
|
|
||||||
支持京东N个账号
|
|
||||||
*/
|
|
||||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
|
||||||
// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下)
|
|
||||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
|
||||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
|
||||||
let shareCodes = [
|
|
||||||
'',//账号一的好友shareCode,不同好友中间用@符号隔开
|
|
||||||
'',//账号二的好友shareCode,不同好友中间用@符号隔开
|
|
||||||
]
|
|
||||||
// 判断github action里面是否有东东工厂互助码
|
|
||||||
if (process.env.JDSPLIT_SHARECODES) {
|
|
||||||
if (process.env.JDSPLIT_SHARECODES.indexOf('&') > -1) {
|
|
||||||
console.log(`您的互助码选择的是用&隔开\n`)
|
|
||||||
shareCodes = process.env.JDSPLIT_SHARECODES.split('&');
|
|
||||||
} else if (process.env.JDSPLIT_SHARECODES.indexOf('\n') > -1) {
|
|
||||||
console.log(`您的互助码选择的是用换行隔开\n`)
|
|
||||||
shareCodes = process.env.JDSPLIT_SHARECODES.split('\n');
|
|
||||||
} else {
|
|
||||||
shareCodes = process.env.JDSPLIT_SHARECODES.split();
|
|
||||||
}
|
|
||||||
} else if (process.env.JDSPLIT_SHARECODES) {
|
|
||||||
console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
|
||||||
}
|
|
||||||
for (let i = 0; i < shareCodes.length; i++) {
|
|
||||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
|
||||||
exports['shareCodes' + index] = shareCodes[i];
|
|
||||||
}
|
|
||||||
@@ -847,7 +847,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/lxk0301/updat
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json') {
|
function updateShareCodesCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_shareCodes.json') {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
//https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json
|
//https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json
|
||||||
//https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json
|
//https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1222,7 +1222,7 @@ function timeFormat(time) {
|
|||||||
return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate());
|
return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate());
|
||||||
}
|
}
|
||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`}, (err, resp, data) => {
|
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -1240,6 +1240,8 @@ function readShareCode() {
|
|||||||
resolve(data);
|
resolve(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(10000);
|
||||||
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function shareCodesFormat() {
|
function shareCodesFormat() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: lxk0301 https://github.com/lxk0301
|
* @Author: lxk0301 https://github.com/lxk0301
|
||||||
* @Date: 2020-11-25 18:19:21
|
* @Date: 2020-12-06 18:19:21
|
||||||
* @Last Modified by: lxk0301
|
* @Last Modified by: lxk0301
|
||||||
* @Last Modified time: 2020-11-28 09:58:02
|
* @Last Modified time: 2020-12-06 22:58:02
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
东东工厂,不是京喜工厂
|
东东工厂,不是京喜工厂
|
||||||
@@ -158,7 +158,7 @@ async function algorithm() {
|
|||||||
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore + 100000}`);
|
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore + 100000}`);
|
||||||
console.log(`请去活动页面更换成心仪商品并手动投入电量兑换\n`);
|
console.log(`请去活动页面更换成心仪商品并手动投入电量兑换\n`);
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n更换成心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n更换成心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`);
|
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n不满足兑换心仪商品的条件\n`)
|
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n不满足兑换心仪商品的条件\n`)
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ async function algorithm() {
|
|||||||
console.log(`BoxJs或环境变量暂未提供心仪商品,下面为您目前选的${name} 发送提示通知\n`);
|
console.log(`BoxJs或环境变量暂未提供心仪商品,下面为您目前选的${name} 发送提示通知\n`);
|
||||||
// await jdfactory_addEnergy();
|
// await jdfactory_addEnergy();
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面查看`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面查看`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`);
|
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【不满足】兑换此商品所需总电量:${totalScore}`)
|
console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【不满足】兑换此商品所需总电量:${totalScore}`)
|
||||||
console.log(`故不一次性投入电力,一直放到蓄电池累计\n`);
|
console.log(`故不一次性投入电力,一直放到蓄电池累计\n`);
|
||||||
@@ -193,16 +193,21 @@ async function algorithm() {
|
|||||||
wantProductSkuId = item.skuId;
|
wantProductSkuId = item.skuId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message += `心仪商品数量:${couponCount}\n`;
|
if (totalScore) {
|
||||||
message += `心仪商品所需电量:${totalScore}\n`;
|
// 库存存在您设置的心仪商品
|
||||||
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
message += `心仪商品数量:${couponCount}\n`;
|
||||||
if (wantProductSkuId && (($.batteryValue * 1) >= (totalScore))) {
|
message += `心仪商品所需电量:${totalScore}\n`;
|
||||||
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${$.batteryValue * 1},【满足】兑换此商品所需总电量:${totalScore}`);
|
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
||||||
console.log(`请去活动页面选择心仪商品并手动投入电量兑换\n`);
|
if (wantProductSkuId && (($.batteryValue * 1) >= (totalScore))) {
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${$.batteryValue * 1},【满足】兑换此商品所需总电量:${totalScore}`);
|
||||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`);
|
console.log(`请去活动页面选择心仪商品并手动投入电量兑换\n`);
|
||||||
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||||
|
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`);
|
||||||
|
} else {
|
||||||
|
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${$.batteryValue * 1}\n不满足兑换心仪商品的条件\n`)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${$.batteryValue * 1}\n不满足兑换心仪商品的条件\n`)
|
message += `目前库存:暂无您设置的心仪商品\n`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`);
|
console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`);
|
||||||
@@ -211,8 +216,8 @@ async function algorithm() {
|
|||||||
message += `兑换所需电量:${$.canMakeList[0].fullScore}\n`;
|
message += `兑换所需电量:${$.canMakeList[0].fullScore}\n`;
|
||||||
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
||||||
if ($.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0].fullScore) {
|
if ($.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0].fullScore) {
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n当前总电量为:${$.batteryValue * 1}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请速去活动页面查看`);
|
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
|
console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
|
||||||
}
|
}
|
||||||
@@ -284,11 +289,11 @@ async function doTask() {
|
|||||||
}
|
}
|
||||||
if (item.taskType === 10) {
|
if (item.taskType === 10) {
|
||||||
if (item.status === 1) {
|
if (item.status === 1) {
|
||||||
if (item.threeMealInfoVos.status === 1) {
|
if (item.threeMealInfoVos[0].status === 1) {
|
||||||
//可以做此任务
|
//可以做此任务
|
||||||
console.log(`准备做此任务:${item.taskName}`);
|
console.log(`准备做此任务:${item.taskName}`);
|
||||||
await jdfactory_collectScore(item.threeMealInfoVos.taskToken);
|
await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken);
|
||||||
} else if (item.threeMealInfoVos.status === 0) {
|
} else if (item.threeMealInfoVos[0].status === 0) {
|
||||||
console.log(`${item.taskName} 任务已错过时间`)
|
console.log(`${item.taskName} 任务已错过时间`)
|
||||||
}
|
}
|
||||||
} else if (item.status === 2){
|
} else if (item.status === 2){
|
||||||
@@ -619,8 +624,8 @@ function readShareCode() {
|
|||||||
resolve(data);
|
resolve(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// await $.wait(2000);
|
await $.wait(10000);
|
||||||
// resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//格式化助力码
|
//格式化助力码
|
||||||
|
|||||||
44
jd_joy.js
44
jd_joy.js
@@ -2,7 +2,7 @@
|
|||||||
jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js
|
jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js
|
||||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||||
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
|
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
|
||||||
更新时间:2020-11-03
|
更新时间:2020-12-06
|
||||||
建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮
|
建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮
|
||||||
feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关
|
feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关
|
||||||
推荐每次投喂10个,积累狗粮,然后去聚宝盆赌每小时的幸运奖,据观察,投入3000-6000中奖概率大,超过7000基本上注定亏本,即使是第一名
|
推荐每次投喂10个,积累狗粮,然后去聚宝盆赌每小时的幸运奖,据观察,投入3000-6000中奖概率大,超过7000基本上注定亏本,即使是第一名
|
||||||
@@ -37,6 +37,7 @@ if ($.isNode()) {
|
|||||||
}
|
}
|
||||||
let message = '', subTitle = '';
|
let message = '', subTitle = '';
|
||||||
let FEED_NUM = ($.getdata('joyFeedCount') * 1) || 10; //每次喂养数量 [10,20,40,80]
|
let FEED_NUM = ($.getdata('joyFeedCount') * 1) || 10; //每次喂养数量 [10,20,40,80]
|
||||||
|
let teamLevel = 2;//参加多少人的赛跑比赛,默认是双人赛跑,可选2,10,50。其他不可选,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛
|
||||||
//是否参加宠汪汪双人赛跑(据目前观察,参加双人赛跑不消耗狗粮,如需参加其他多人赛跑,请关闭)
|
//是否参加宠汪汪双人赛跑(据目前观察,参加双人赛跑不消耗狗粮,如需参加其他多人赛跑,请关闭)
|
||||||
// 默认 'true' 参加双人赛跑,如需关闭 ,请改成 'false';
|
// 默认 'true' 参加双人赛跑,如需关闭 ,请改成 'false';
|
||||||
let joyRunFlag = true;
|
let joyRunFlag = true;
|
||||||
@@ -133,15 +134,16 @@ async function joinTwoPeopleRun() {
|
|||||||
console.log(`\n===========以下是双人赛跑信息========\n`)
|
console.log(`\n===========以下是双人赛跑信息========\n`)
|
||||||
await getPetRace();
|
await getPetRace();
|
||||||
if ($.petRaceResult) {
|
if ($.petRaceResult) {
|
||||||
|
teamLevel = $.isNode() ? (process.env.JOY_TEAM_LEVEL ? process.env.JOY_TEAM_LEVEL : teamLevel) : ($.getdata('JOY_TEAM_LEVEL') ? $.getdata('JOY_TEAM_LEVEL') : teamLevel);
|
||||||
let petRaceResult = $.petRaceResult.data.petRaceResult;
|
let petRaceResult = $.petRaceResult.data.petRaceResult;
|
||||||
let raceUsers = $.petRaceResult.data.raceUsers;
|
let raceUsers = $.petRaceResult.data.raceUsers;
|
||||||
console.log(`赛跑状态:${petRaceResult}\n`);
|
console.log(`赛跑状态:${petRaceResult}\n`);
|
||||||
if (petRaceResult === 'not_participate') {
|
if (petRaceResult === 'not_participate') {
|
||||||
console.log('暂未参赛,现在为您参加双人赛跑');
|
console.log(`暂未参赛,现在为您参加${teamLevel}人赛跑`);
|
||||||
await runMatch(2);
|
await runMatch(teamLevel * 1);
|
||||||
if ($.runMatchResult.success) {
|
if ($.runMatchResult.success) {
|
||||||
console.log(`双人赛跑参加成功\n`);
|
console.log(`${teamLevel}人赛跑参加成功\n`);
|
||||||
message += `双人赛跑:成功参加\n`;
|
message += `${teamLevel}人赛跑:成功参加\n`;
|
||||||
await getPetRace();
|
await getPetRace();
|
||||||
petRaceResult = $.petRaceResult.data.petRaceResult;
|
petRaceResult = $.petRaceResult.data.petRaceResult;
|
||||||
raceUsers = $.petRaceResult.data.raceUsers;
|
raceUsers = $.petRaceResult.data.raceUsers;
|
||||||
@@ -157,10 +159,16 @@ async function joinTwoPeopleRun() {
|
|||||||
}
|
}
|
||||||
if (petRaceResult === 'unreceive') {
|
if (petRaceResult === 'unreceive') {
|
||||||
console.log('今日参赛的比赛已经结束,现在领取奖励');
|
console.log('今日参赛的比赛已经结束,现在领取奖励');
|
||||||
|
await getWinCoin();
|
||||||
|
let winCoin = 0;
|
||||||
|
if ($.getWinCoinRes && $.getWinCoinRes.success) {
|
||||||
|
winCoin = $.getWinCoinRes.data.winCoin;
|
||||||
|
}
|
||||||
await receiveJoyRunAward();
|
await receiveJoyRunAward();
|
||||||
console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`)
|
console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`)
|
||||||
if ($.receiveJoyRunAwardRes.success) {
|
if ($.receiveJoyRunAwardRes.success) {
|
||||||
$.msg($.name, '双人赛跑取得获胜', `【京东账号${$.index}】${$.nickName}\n太棒了,恭喜您获得300积分奖励`)
|
$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`);
|
||||||
|
if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (petRaceResult === 'participate') {
|
if (petRaceResult === 'participate') {
|
||||||
@@ -604,6 +612,7 @@ function getPetRace() {
|
|||||||
}
|
}
|
||||||
//参加赛跑API
|
//参加赛跑API
|
||||||
function runMatch(teamLevel, timeout = 5000) {
|
function runMatch(teamLevel, timeout = 5000) {
|
||||||
|
if (teamLevel === 10 || teamLevel === 50) timeout = 60000;
|
||||||
console.log(`正在参赛中,请稍等${timeout / 1000}秒,以防多个账号匹配到统一赛场\n`)
|
console.log(`正在参赛中,请稍等${timeout / 1000}秒,以防多个账号匹配到统一赛场\n`)
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
await $.wait(timeout);
|
await $.wait(timeout);
|
||||||
@@ -650,6 +659,29 @@ function getBackupInfo() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//查询赛跑获得多少积分
|
||||||
|
function getWinCoin() {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
const url = `${weAppUrl}/combat/detail/v2?help=false&reqSource=weapp`;
|
||||||
|
$.get(taskUrl(url, 'draw.jdfcloud.com', `weapp`), (err, resp, data) => {
|
||||||
|
try {
|
||||||
|
if (err) {
|
||||||
|
console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️')
|
||||||
|
} else {
|
||||||
|
// console.log('查询应援团信息API',(data))
|
||||||
|
// $.appGetPetTaskConfigRes = JSON.parse(data);
|
||||||
|
if (data) {
|
||||||
|
$.getWinCoinRes = JSON.parse(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
$.logErr(e, resp);
|
||||||
|
} finally {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
//领取赛跑奖励API
|
//领取赛跑奖励API
|
||||||
function receiveJoyRunAward() {
|
function receiveJoyRunAward() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ const isRequest = typeof $request != "undefined"
|
|||||||
const $ = new Env('宠汪汪赛跑');
|
const $ = new Env('宠汪汪赛跑');
|
||||||
const JD_BASE_API = `https://draw.jdfcloud.com//pet`;
|
const JD_BASE_API = `https://draw.jdfcloud.com//pet`;
|
||||||
//此处填入你需要助力好友的京东用户名
|
//此处填入你需要助力好友的京东用户名
|
||||||
//给下面好友邀请助力的
|
//下面给出好友邀请助力的示例填写规则
|
||||||
let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58"];
|
let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"];
|
||||||
//给下面好友赛跑助力
|
//下面给出好友赛跑助力的示例填写规则
|
||||||
let run_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58"];
|
let run_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"];
|
||||||
// $.LKYLToken = '76fe7794c475c18711e3b47185f114b5' || $.getdata('jdJoyRunToken');
|
// $.LKYLToken = '76fe7794c475c18711e3b47185f114b5' || $.getdata('jdJoyRunToken');
|
||||||
// $.LKYLToken = $.getdata('jdJoyRunToken');
|
// $.LKYLToken = $.getdata('jdJoyRunToken');
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const notify = $.isNode() ? require('./sendNotify') : '';
|
|||||||
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
|
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
|
||||||
const randomCount = 3;
|
const randomCount = 3;
|
||||||
let cookiesArr = [], cookie = '', message = '';
|
let cookiesArr = [], cookie = '', message = '';
|
||||||
const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo='];
|
const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo=@iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=', 'iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI='];
|
||||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
Object.keys(jdCookieNode).forEach((item) => {
|
Object.keys(jdCookieNode).forEach((item) => {
|
||||||
@@ -90,8 +90,12 @@ async function jdJxStory() {
|
|||||||
await upgrade();
|
await upgrade();
|
||||||
}
|
}
|
||||||
await cardList()
|
await cardList()
|
||||||
$.click = true;
|
if ($.isNode()) {
|
||||||
while($.click){
|
$.click = true;
|
||||||
|
while($.click){
|
||||||
|
await increase()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
await increase()
|
await increase()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -516,10 +520,10 @@ function shareCodesFormat() {
|
|||||||
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
||||||
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
||||||
}
|
}
|
||||||
const readShareCodeRes = await readShareCode();
|
// const readShareCodeRes = await readShareCode();
|
||||||
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
// if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||||
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
// $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||||
}
|
// }
|
||||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_lotteryMachine.js') {
|
function updateShareCodesCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.get({url}, async (err, resp, data) => {
|
$.get({url}, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
秒杀红包雨,可以获取3次,一天运行一次即可
|
秒杀红包雨,可以获取3次,一天运行一次即可
|
||||||
|
活动时间:2020-12-1 到 2020-12-31
|
||||||
|
活动入口:首页👉秒杀👉往下拉(手指向上滑动)👉可以看到狂撒2亿京东
|
||||||
更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js
|
更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js
|
||||||
已支持IOS双京东账号, Node.js支持N个京东账号
|
已支持IOS双京东账号, Node.js支持N个京东账号
|
||||||
脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
|
脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
|
||||||
============Quantumultx===============
|
============Quantumultx===============
|
||||||
[task_local]
|
[task_local]
|
||||||
#秒杀红包雨
|
#秒杀红包雨
|
||||||
10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ms_redrain.png, enabled=true
|
10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true
|
||||||
|
|
||||||
================Loon==============
|
================Loon==============
|
||||||
[Script]
|
[Script]
|
||||||
@@ -95,11 +97,12 @@ function getRedRain() {
|
|||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
if (data.subCode === '0') {
|
if (data.subCode === '0') {
|
||||||
console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`)
|
console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`)
|
||||||
message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
|
// message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
|
||||||
|
message+= `${data.lotteryResult.jPeasList[0].ext}:${(data.lotteryResult.jPeasList[0].quantity)}京豆\n`
|
||||||
|
|
||||||
} else if (data.subCode === '8') {
|
} else if (data.subCode === '8') {
|
||||||
console.log(`今日次数已满`)
|
console.log(`今日次数已满`)
|
||||||
message += `领取失败,今日已签到`;
|
message += `领取失败,今日已签到\n`;
|
||||||
} else {
|
} else {
|
||||||
console.log(`异常:${JSON.stringify(data)}`)
|
console.log(`异常:${JSON.stringify(data)}`)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ async function showMsg() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`}, (err, resp, data) => {
|
$.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -454,6 +454,8 @@ function readShareCode() {
|
|||||||
resolve(data);
|
resolve(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(10000);
|
||||||
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function shareCodesFormat() {
|
function shareCodesFormat() {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ async function jdPlantBean() {
|
|||||||
awardState = roundList[0].awardState;
|
awardState = roundList[0].awardState;
|
||||||
$.taskList = $.plantBeanIndexResult.data.taskList;
|
$.taskList = $.plantBeanIndexResult.data.taskList;
|
||||||
subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`;
|
subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`;
|
||||||
message += `【上期时间】${roundList[0].dateDesc}\n`;
|
message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`;
|
||||||
message += `【上期成长值】${roundList[0].growth}\n`;
|
message += `【上期成长值】${roundList[0].growth}\n`;
|
||||||
await receiveNutrients();//定时领取营养液
|
await receiveNutrients();//定时领取营养液
|
||||||
await doHelp();//助力
|
await doHelp();//助力
|
||||||
@@ -501,7 +501,7 @@ async function plantBeanIndex() {
|
|||||||
$.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody
|
$.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody
|
||||||
}
|
}
|
||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`}, (err, resp, data) => {
|
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -519,6 +519,8 @@ function readShareCode() {
|
|||||||
resolve(data);
|
resolve(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(15000);
|
||||||
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//格式化助力码
|
//格式化助力码
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function scriptsCDN(url = 'https://cdn.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_rankingList.js') {
|
function scriptsCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_rankingList.js') {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.get({url}, async (err, resp, data) => {
|
$.get({url}, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ async function doChannelsListTask(taskId, taskType) {
|
|||||||
}
|
}
|
||||||
async function helpFriends() {
|
async function helpFriends() {
|
||||||
await updateInviteCode();
|
await updateInviteCode();
|
||||||
if (!$.updatePkActivityIdRes) await updateInviteCodeCDN();
|
if (!$.inviteCodes) await updateInviteCodeCDN();
|
||||||
for (let item of $.inviteCodes.inviteCode) {
|
for (let item of $.inviteCodes.inviteCode) {
|
||||||
if (!item) continue
|
if (!item) continue
|
||||||
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
||||||
@@ -710,7 +710,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updat
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateInviteCodeCDN(url = 'https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateSmallHomeInviteCode.json') {
|
function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
$.get({url}, async (err, resp, data) => {
|
$.get({url}, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
79
jd_split.js
79
jd_split.js
@@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
金榜年终奖
|
金榜年终奖
|
||||||
|
活动时间:2020-12-12日结束
|
||||||
|
活动入口:京东APP首页右边浮动飘窗
|
||||||
已支持IOS双京东账号,Node.js支持N个京东账号
|
已支持IOS双京东账号,Node.js支持N个京东账号
|
||||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||||
============Quantumultx===============
|
============Quantumultx===============
|
||||||
@@ -35,9 +37,8 @@ if ($.isNode()) {
|
|||||||
cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]);
|
cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]);
|
||||||
}
|
}
|
||||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||||
const inviteCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH'];
|
$.newShareCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH', 'P04z54XCjVUnIaW5u2ak7ZCdan1BT0NlbBGZ1-rnMYj'];
|
||||||
!(async () => {
|
!(async () => {
|
||||||
await requireConfig();
|
|
||||||
if (!cookiesArr[0]) {
|
if (!cookiesArr[0]) {
|
||||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
||||||
return;
|
return;
|
||||||
@@ -62,7 +63,6 @@ const inviteCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJc
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
await shareCodesFormat();
|
|
||||||
await jdSplit()
|
await jdSplit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,14 +81,8 @@ async function jdSplit() {
|
|||||||
}
|
}
|
||||||
function showMsg() {
|
function showMsg() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (!jdNotify) {
|
message += `任务已做完:具体奖品去发活动页面查看\n活动入口:京东APP首页右边浮动飘窗`;
|
||||||
$.msg($.name, '', `${message}`);
|
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
|
||||||
} else {
|
|
||||||
$.log(`京东账号${$.index}${$.nickName}\n${message}`);
|
|
||||||
}
|
|
||||||
if (new Date().getHours() === 23) {
|
|
||||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
|
|
||||||
}
|
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -232,69 +226,6 @@ function jdsplit_getTaskDetail() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function readShareCode() {
|
|
||||||
console.log(`开始`)
|
|
||||||
return new Promise(async resolve => {
|
|
||||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/jdsplit/read/${randomCount}/`}, (err, resp, data) => {
|
|
||||||
try {
|
|
||||||
if (err) {
|
|
||||||
console.log(`${JSON.stringify(err)}`)
|
|
||||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
|
||||||
} else {
|
|
||||||
if (data) {
|
|
||||||
console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
|
|
||||||
data = JSON.parse(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
$.logErr(e, resp)
|
|
||||||
} finally {
|
|
||||||
resolve(data);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// await $.wait(2000);
|
|
||||||
// resolve()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//格式化助力码
|
|
||||||
function shareCodesFormat() {
|
|
||||||
return new Promise(async resolve => {
|
|
||||||
// console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`)
|
|
||||||
$.newShareCodes = [];
|
|
||||||
if ($.shareCodesArr[$.index - 1]) {
|
|
||||||
$.newShareCodes = $.shareCodesArr[$.index - 1].split('@');
|
|
||||||
} else {
|
|
||||||
console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`)
|
|
||||||
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
|
||||||
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
|
||||||
}
|
|
||||||
const readShareCodeRes = null //await readShareCode();
|
|
||||||
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
|
||||||
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
|
||||||
}
|
|
||||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function requireConfig() {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
console.log(`开始获取${$.name}配置文件\n`);
|
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
|
||||||
const shareCodes = $.isNode() ? require('./jdSplitShareCodes.js') : '';
|
|
||||||
console.log(`共${cookiesArr.length}个京东账号\n`);
|
|
||||||
$.shareCodesArr = [];
|
|
||||||
if ($.isNode()) {
|
|
||||||
Object.keys(shareCodes).forEach((item) => {
|
|
||||||
if (shareCodes[item]) {
|
|
||||||
$.shareCodesArr.push(shareCodes[item])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`);
|
|
||||||
console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`);
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function taskPostUrl(function_id, body = {}, function_id2) {
|
function taskPostUrl(function_id, body = {}, function_id2) {
|
||||||
let url = `${JD_API_HOST}`;
|
let url = `${JD_API_HOST}`;
|
||||||
if (function_id2) {
|
if (function_id2) {
|
||||||
|
|||||||
@@ -406,10 +406,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "joyRunFlag",
|
"id": "joyRunFlag",
|
||||||
"name": "是否参加双人赛跑(默认参加)",
|
"name": "是否参加赛跑(默认参加)",
|
||||||
"val": true,
|
"val": true,
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"desc": "开启脚本将会为您自动参加双人赛跑"
|
"desc": "开启脚本将会为您自动参加赛跑(默认参加双人赛跑)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "JOY_TEAM_LEVEL",
|
||||||
|
"name": "宠汪汪赛跑级别选择",
|
||||||
|
"val": "2",
|
||||||
|
"type": "radios",
|
||||||
|
"desc": "参加多少人的赛跑比赛,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"key": "2",
|
||||||
|
"label": "双人PK赛"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "10",
|
||||||
|
"label": "10人突围赛"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "50",
|
||||||
|
"label": "50人挑战赛"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "joyFeedCount",
|
"id": "joyFeedCount",
|
||||||
|
|||||||
Reference in New Issue
Block a user