From b356c5ad01a4432bb9282f57bc0c67cad8895b1b Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Thu, 24 Dec 2020 18:55:46 +0800
Subject: [PATCH 001/105] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E6=96=B0=E5=A2=9E=E7=96=AF=E7=8B=82=E7=9A=84joy?=
=?UTF-8?q?=E4=BA=92=E5=8A=A9=E7=A0=81secret?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
云函数同步新增疯狂的joy互助码secret
---
.github/workflows/deploy_tencent_scf.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/deploy_tencent_scf.yml b/.github/workflows/deploy_tencent_scf.yml
index 78ff5534..100db470 100644
--- a/.github/workflows/deploy_tencent_scf.yml
+++ b/.github/workflows/deploy_tencent_scf.yml
@@ -70,6 +70,7 @@ jobs:
if [ $DDFACTORY_SHARECODES ]; then sed -i "/variables/a\ DDFACTORY_SHARECODES: $DDFACTORY_SHARECODES" serverless.yml; fi;
if [ $DREAM_FACTORY_SHARE_CODES ]; then sed -i "/variables/a\ DREAM_FACTORY_SHARE_CODES: $DREAM_FACTORY_SHARE_CODES" serverless.yml; fi;
if [ $JDZZ_SHARECODES ]; then sed -i "/variables/a\ JDZZ_SHARECODES: $JDZZ_SHARECODES" serverless.yml; fi;
+ if [ $JDJOY_SHARECODES ]; then sed -i "/variables/a\ JDJOY_SHARECODES: $JDJOY_SHARECODES" serverless.yml; fi;
if [ $TG_PROXY_HOST ]; then sed -i "/variables/a\ TG_PROXY_HOST: $TG_PROXY_HOST" serverless.yml; fi;
if [ $TG_PROXY_PORT ]; then sed -i "/variables/a\ TG_PROXY_PORT: $TG_PROXY_PORT" serverless.yml; fi;
if [ $MONEY_TREE_SELL_FRUIT ]; then sed -i "/variables/a\ MONEY_TREE_SELL_FRUIT: $MONEY_TREE_SELL_FRUIT" serverless.yml; fi;
@@ -124,6 +125,7 @@ jobs:
DDFACTORY_SHARECODES: ${{ secrets.DDFACTORY_SHARECODES}}
DREAM_FACTORY_SHARE_CODES: ${{ secrets.DREAM_FACTORY_SHARE_CODES}}
JDZZ_SHARECODES: ${{ secrets.JDZZ_SHARECODES}}
+ JDJOY_SHARECODES: ${{ secrets.JDJOY_SHARECODES}}
TG_PROXY_HOST: ${{ secrets.TG_PROXY_HOST}}
TG_PROXY_PORT: ${{ secrets.TG_PROXY_PORT}}
MONEY_TREE_SELL_FRUIT: ${{ secrets.MONEY_TREE_SELL_FRUIT}}
From 4728408861dc825356cc916cb42c2a0876089ffa Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 24 Dec 2020 21:28:46 +0800
Subject: [PATCH 002/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A0=E6=B1=AA?=
=?UTF-8?q?=E6=B1=AA=E8=B5=9B=E8=B7=91=E6=88=90=E5=8A=9F=E5=90=8E=E9=A2=86?=
=?UTF-8?q?=E5=8F=96=E5=A5=96=E5=8A=B1=E5=87=BA=E7=8E=B0=E7=9A=84"null?=
=?UTF-8?q?=E4=BA=BA"=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_joy.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/jd_joy.js b/jd_joy.js
index 302fc972..84252778 100644
--- a/jd_joy.js
+++ b/jd_joy.js
@@ -164,16 +164,15 @@ async function joinTwoPeopleRun() {
if (petRaceResult === 'unreceive') {
console.log('今日参赛的比赛已经结束,现在领取奖励');
await getWinCoin();
- let winCoin = 0, teamLimitCount = 2;
+ let winCoin = 0;
if ($.getWinCoinRes && $.getWinCoinRes.success) {
winCoin = $.getWinCoinRes.data.winCoin;
- teamLimitCount = $.getWinCoinRes.data.teamLimitCount;
}
await receiveJoyRunAward();
console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`)
if ($.receiveJoyRunAwardRes.success) {
- $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${teamLimitCount}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`);
- if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n${teamLimitCount}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
+ $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${$.name}赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`);
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n太棒了,${$.name}赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
}
}
if (petRaceResult === 'participate') {
From 637ebc95e2fdb93ba6de7b682e0e5ea7921e2c22 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 00:18:57 +0800
Subject: [PATCH 003/105] Update README.md
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index a9bf2043..7002d51d 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,6 @@
**TODO**
-- [ ] 东东工厂相互助力
-- [ ] 京喜工厂相互助力
## 食用方法
From 7aabae9bc9bf9343317e5a4f4915d94e385d86f2 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 00:20:58 +0800
Subject: [PATCH 004/105] Update githubAction.md
---
githubAction.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/githubAction.md b/githubAction.md
index c730ea0f..415242ed 100644
--- a/githubAction.md
+++ b/githubAction.md
@@ -118,9 +118,9 @@ Apple京东自营旗舰店
100&100&iPhone12&Apple京东自营旗舰店
```
-#### 关于脚本推送通知(微信server酱推送通知,bark app推送通知,telegram机器人推送通知,钉钉机器人推送通知,iGot聚合推送)
+#### 关于脚本推送通知频率
- > 如果你填写了上面五种推送通知方式中的某一个通知所需secret,那么脚本通知情况如下:
+ > 如果你填写了推送通知方式中的某一种通知所需环境变量,那么脚本通知情况如下:
> 目前默认只有jd_fruit.js,jd_pet.js,jd_bean_sign.js,jd_818.js四个脚本每次运行后都通知
From 19cf396eae9c843ca32f253c883299133e24d39f Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 09:47:57 +0800
Subject: [PATCH 005/105] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B0=B4=E6=9E=9C?=
=?UTF-8?q?=E6=88=90=E7=86=9F=E5=90=8E=E7=9A=84=E5=BC=B9=E7=AA=97=E6=8F=90?=
=?UTF-8?q?=E9=86=92=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_fruit.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/jd_fruit.js b/jd_fruit.js
index 4f2eaa55..03185eb1 100644
--- a/jd_fruit.js
+++ b/jd_fruit.js
@@ -1,6 +1,6 @@
/*
东东水果:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js
-更新时间:2020-12-15
+更新时间:2020-12-25
东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -279,7 +279,7 @@ async function doTenWater() {
}
if (isFruitFinished) {
option['open-url'] = urlSchema;
- $.msg($.name, `【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取`, '请去京东APP或微信小程序查看\n点击弹窗即达', option);
+ $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option);
$.done();
if ($.isNode()) {
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`);
@@ -403,7 +403,7 @@ async function doTenWaterAgain() {
}
if (isFruitFinished) {
option['open-url'] = urlSchema;
- $.msg($.name, `【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取`, '请去京东APP或微信小程序查看\n点击弹窗即达', option);
+ $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option);
$.done();
if ($.isNode()) {
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`);
@@ -431,7 +431,7 @@ async function doTenWaterAgain() {
}
if (isFruitFinished) {
option['open-url'] = urlSchema;
- $.msg($.name, `【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取`, '请去京东APP或微信小程序查看\n点击弹窗即达', option);
+ $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option);
$.done();
if ($.isNode()) {
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`);
From 0c6072b63969475ccde4506ca9217760c96d5635 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 09:54:53 +0800
Subject: [PATCH 006/105] =?UTF-8?q?=E4=BA=AC=E5=96=9C=E5=B7=A5=E5=8E=82?=
=?UTF-8?q?=E5=A6=82=E6=9A=82=E6=9C=AA=E9=80=89=E6=8B=A9=E6=96=B0=E7=9A=84?=
=?UTF-8?q?=E5=95=86=E5=93=81=E7=94=9F=E4=BA=A7=EF=BC=8C=E5=88=99=E6=AF=8F?=
=?UTF-8?q?=E9=9A=946=E5=B0=8F=E6=97=B6=E6=8F=90=E9=86=92=E4=B8=80?=
=?UTF-8?q?=E6=AC=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_dreamFactory.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index ba261991..4c0b8fc5 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -565,7 +565,12 @@ function userInfo() {
// $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`);
} else if (data.factoryList && !data.productionList) {
console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`)
- // $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
+ let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
+ if (nowTimes.getHours() % 6 === 0) {
+ //如按每小时运行一次,则此处将一天推送4次提醒
+ $.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
+ await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`)
+ }
}
}
} else {
From 411e75065225d036223e3411788a11911e0d54c5 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 10:41:07 +0800
Subject: [PATCH 007/105] =?UTF-8?q?=E5=A4=A9=E5=A4=A9=E5=8A=A0=E9=80=9F?=
=?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8=E9=A2=86=E5=8F=96?=
=?UTF-8?q?=20=E5=B7=B2=E5=AE=8C=E6=88=90=E7=9A=84=E8=99=AB=E6=B4=9E?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BA=AC=E8=B1=86=E5=A5=96=E5=8A=B1(?=
=?UTF-8?q?=E6=AF=8F=E4=B8=AA=E4=BB=BB=E5=8A=A1=E5=8F=AF=E5=BE=97100-300?=
=?UTF-8?q?=E4=BA=AC=E8=B1=86)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_speed.js | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 99 insertions(+), 3 deletions(-)
diff --git a/jd_speed.js b/jd_speed.js
index f9da4a9c..305701ce 100644
--- a/jd_speed.js
+++ b/jd_speed.js
@@ -1,12 +1,11 @@
/*
京东天天加速链接:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js
-更新时间:2020-11-03
+更新时间:2020-12-25
支持京东双账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
每天4京豆,再小的苍蝇也是肉
从 https://github.com/Zero-S1/JD_tools/blob/master/JD_speed.py 改写来的
建议3小时运行一次,打卡时间间隔是6小时
-注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save
*/
// quantumultx
// [task_local]
@@ -67,6 +66,7 @@ const JD_API_HOST = 'https://api.m.jd.com/'
message = '';
subTitle = '';
await jDSpeedUp();
+ await getMemBerList();
await showMsg();
}
}
@@ -85,7 +85,7 @@ function showMsg() {
$.log(`\n${message}\n`);
}
}
-function jDSpeedUp(sourceId, doubleKey) {
+function jDSpeedUp(sourceId) {
return new Promise((resolve) => {
let body = {"source": "game"};
if (sourceId) {
@@ -109,6 +109,7 @@ function jDSpeedUp(sourceId, doubleKey) {
try {
if (err) {
console.log('京东天天-加速: 签到接口请求失败 ‼️‼️');
+ console.log(`${JSON.stringify(err)}`)
} else {
if (data) {
let res = JSON.parse(data);
@@ -184,6 +185,7 @@ function spaceEventList() {
try {
if (err) {
console.log("\n京东天天-加速: 查询太空特殊事件请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(err)}`)
} else {
if (data) {
const cc = JSON.parse(data);
@@ -244,6 +246,7 @@ function spaceEventHandleEvent(spaceEventList) {
try {
if (err) {
console.log("\n京东天天-加速: 处理太空特殊事件请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(err)}`)
} else {
if (data) {
const cc = JSON.parse(data);
@@ -291,6 +294,7 @@ function energyPropList() {
try {
if (err) {
console.log("\n京东天天-加速: 查询道具请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(err)}`)
} else {
if (data) {
const cc = JSON.parse(data)
@@ -346,6 +350,7 @@ function receiveEnergyProp(CID) {
try {
if (error) {
console.log("\n天天加速-领取道具请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(error)}`)
} else {
if (data) {
const cc = JSON.parse(data)
@@ -390,6 +395,7 @@ function energyPropUsaleList(EID) {
try {
if (error) {
console.log("\n天天加速-查询道具ID请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(error)}`)
} else {
if (data) {
const cc = JSON.parse(data);
@@ -450,6 +456,7 @@ function useEnergy(PropID) {
try {
if (error) {
console.log("\n天天加速-使用燃料请求失败 ‼️‼️")
+ console.log(`${JSON.stringify(error)}`)
} else {
if (data) {
const cc = JSON.parse(data);
@@ -476,6 +483,84 @@ function useEnergy(PropID) {
}
})
}
+function getMemBerList() {
+ return new Promise((resolve) => {
+ const body = { "source": "game", "status": 0};
+ const spaceEventUrl = {
+ url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=member_list&body=${escape(JSON.stringify(body))}&_t=${Date.now()}`,
+ headers: {
+ Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html',
+ Cookie: cookie,
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.get(spaceEventUrl, async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ console.log(`${JSON.stringify(err)}`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data && data.success) {
+ $.getRewardBeans = 0;
+ console.log(`\n检查是否可领虫洞京豆奖励`)
+ $.memBerList = data.data.filter(item => item['taskStatus'] === 2);
+ if ($.memBerList && $.memBerList.length > 0) {
+ for (let uuids of $.memBerList) {
+ await getReward(uuids['uuid']);
+ }
+ if ($.getRewardBeans > 0) {
+ $.msg(`${$.name}`, '', `${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`);
+ await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`)
+ }
+ } else {
+ console.log(`暂无可领取的虫洞京豆奖励`)
+ }
+ }
+ }
+ }
+ } catch (e) {
+ $.msg("天天加速-查询太空特殊事件" + e.name + "‼️", JSON.stringify(e), e.message)
+ $.logErr(e, resp)
+ } finally {
+ resolve()
+ }
+ })
+ })
+}
+function getReward(uuid) {
+ return new Promise((resolve) => {
+ const body = { "source": "game", uuid};
+ const options = {
+ url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=member_getReward&body=${escape(JSON.stringify(body))}&_t=${Date.now()}`,
+ headers: {
+ Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html',
+ Cookie: cookie,
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.get(options, async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ console.log(`${JSON.stringify(err)}`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data && data.success) {
+ $.getRewardBeans += data.data.beans;
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve()
+ }
+ })
+ })
+}
function TotalBean() {
return new Promise(async resolve => {
const options = {
@@ -527,5 +612,16 @@ function jsonParse(str) {
}
}
}
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
// prettier-ignore
function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,o)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=e&&e.timeout?e.timeout:o;const[r,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),h=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t))}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",o){const r=t=>{if(!t||!this.isLoon()&&this.isSurge())return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(o)):this.isQuanX()&&$notify(e,s,i,r(o)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
\ No newline at end of file
From cdeac08bfeadc6e4764faff47dbeb5b8592e43b9 Mon Sep 17 00:00:00 2001
From: Jone2008 <70353049+Jone2008@users.noreply.github.com>
Date: Fri, 25 Dec 2020 11:21:19 +0800
Subject: [PATCH 008/105] Update jdDreamFactoryShareCodes.js
---
jdDreamFactoryShareCodes.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jdDreamFactoryShareCodes.js b/jdDreamFactoryShareCodes.js
index 61148552..8092924b 100644
--- a/jdDreamFactoryShareCodes.js
+++ b/jdDreamFactoryShareCodes.js
@@ -11,7 +11,7 @@ let shareCodes = [
'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@Bo-jnVs_m9uBvbRzraXcSA==@-OvElMzqeyeGBWazWYjI1Q==',//账号一的好友shareCode,不同好友中间用@符号隔开
'1uzRU5HkaUgvy0AB5Q9VUg==@PDPM257r_KuQhil2Y7koNw==@-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开
]
-// 判断github action里面是否有东东萌宠互助码
+// 判断github action里面是否有京喜工厂互助码
if (process.env.DREAM_FACTORY_SHARE_CODES) {
if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('&') > -1) {
console.log(`您的互助码选择的是用&隔开\n`)
@@ -28,4 +28,4 @@ if (process.env.DREAM_FACTORY_SHARE_CODES) {
for (let i = 0; i < shareCodes.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
exports['shareCodes' + index] = shareCodes[i];
-}
\ No newline at end of file
+}
From a71b45f50204bf4e54050885025885413e1e64f6 Mon Sep 17 00:00:00 2001
From: Jone2008 <70353049+Jone2008@users.noreply.github.com>
Date: Fri, 25 Dec 2020 11:23:30 +0800
Subject: [PATCH 009/105] Update jdPlantBeanShareCodes.js
---
jdPlantBeanShareCodes.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jdPlantBeanShareCodes.js b/jdPlantBeanShareCodes.js
index 3894909b..faba2b6b 100644
--- a/jdPlantBeanShareCodes.js
+++ b/jdPlantBeanShareCodes.js
@@ -11,7 +11,7 @@ let PlantBeanShareCodes = [
'66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy',//账号一的好友shareCode,不同好友中间用@符号隔开
'4npkonnsy7xi3p6pjfxg6ct5gll42gmvnz7zgoy@6dygkptofggtp6ffhbowku3xgu@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开
]
-// 判断github action里面是否有东东萌宠互助码
+// 判断github action里面是否有种豆得豆互助码
if (process.env.PLANT_BEAN_SHARECODES) {
if (process.env.PLANT_BEAN_SHARECODES.indexOf('&') > -1) {
console.log(`您的种豆互助码选择的是用&隔开\n`)
@@ -28,4 +28,4 @@ if (process.env.PLANT_BEAN_SHARECODES) {
for (let i = 0; i < PlantBeanShareCodes.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
exports['PlantBeanShareCodes' + index] = PlantBeanShareCodes[i];
-}
\ No newline at end of file
+}
From e3a560c56d56ba9c2d2ee54197611f453bd8388b Mon Sep 17 00:00:00 2001
From: Jone2008 <70353049+Jone2008@users.noreply.github.com>
Date: Fri, 25 Dec 2020 11:24:49 +0800
Subject: [PATCH 010/105] Update jdFruitShareCodes.js
---
jdFruitShareCodes.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jdFruitShareCodes.js b/jdFruitShareCodes.js
index 4ddbd3da..d06c92d1 100644
--- a/jdFruitShareCodes.js
+++ b/jdFruitShareCodes.js
@@ -1,5 +1,5 @@
/*
-水果互助码
+东东农场互助码
此文件为Node.js专用。其他用户请忽略
支持京东N个账号
*/
@@ -11,7 +11,7 @@ let FruitShareCodes = [
'0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开
'6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode,不同好友中间用@符号隔开
]
-// 判断github action里面是否有水果互助码
+// 判断github action里面是否有东东农场互助码
if (process.env.FRUITSHARECODES) {
if (process.env.FRUITSHARECODES.indexOf('&') > -1) {
console.log(`您的东东农场互助码选择的是用&隔开\n`)
From 4cd430b404b98a012bc682f46f8decb6a1522ade Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 12:31:48 +0800
Subject: [PATCH 011/105] fix
---
jd_speed.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jd_speed.js b/jd_speed.js
index 305701ce..8c177e80 100644
--- a/jd_speed.js
+++ b/jd_speed.js
@@ -511,8 +511,8 @@ function getMemBerList() {
await getReward(uuids['uuid']);
}
if ($.getRewardBeans > 0) {
- $.msg(`${$.name}`, '', `${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`);
- await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`)
+ $.msg(`${$.name}`, '', `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`);
+ await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`)
}
} else {
console.log(`暂无可领取的虫洞京豆奖励`)
From 50a08f74a8d344b4d4bff8aa2b5ccbc70f72f7ff Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 12:39:33 +0800
Subject: [PATCH 012/105] =?UTF-8?q?=E4=B8=89=E5=A4=A7=E8=BD=AF=E4=BB=B6?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E9=98=85=EF=BC=88=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84joy=E6=97=A5=E5=B8=B8=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1=E8=84=9A=E6=9C=AC=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Loon/lxk0301_LoonTask.conf | 4 +++-
QuantumultX/lxk0301_gallery.json | 1 +
Surge/lxk0301_Task.sgmodule.sgmodule | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index d2fbd7ae..b334fd30 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -120,4 +120,6 @@ cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lx
# 金融打卡领年终奖
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=健康抽奖机
\ No newline at end of file
+cron "10 0 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
+# 疯狂的joy日常任务
+cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
\ No newline at end of file
diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json
index bc4aee1c..7bc2c286 100644
--- a/QuantumultX/lxk0301_gallery.json
+++ b/QuantumultX/lxk0301_gallery.json
@@ -35,6 +35,7 @@
"10 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png",
"14 11 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png",
"44 12 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png",
+ "30 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
"1 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"
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 5a277b26..2be5a205 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -71,6 +71,8 @@ cron "20 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, timeout=750, wake-system=1, tag=京东赚赚
#注销京东店铺会员卡
cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, timeout=750, wake-system=1, tag=注销京东店铺会员卡
+#疯狂的joy日常任务
+cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务
#以下为短期活动
#金融打卡领年终奖
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=金融打卡领年终奖
From ec4d1ea75b150c07ed5c0cfe047d66adbc52de08 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 13:09:36 +0800
Subject: [PATCH 013/105] update
---
README.md | 68 +++++++++++++++++++++++++++++++------------------------
1 file changed, 38 insertions(+), 30 deletions(-)
diff --git a/README.md b/README.md
index 7002d51d..fb8d8eee 100644
--- a/README.md
+++ b/README.md
@@ -20,36 +20,44 @@
> ***您使用或者复制了本仓库且本人制作的任何脚本,则视为`已接受`此声明,请仔细阅读***
## Script脚本列表
+#### 说明
+1. 其中 [jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_sign.js) 可N个京东账号,Node.js专用,核心脚本是JD_DailyBonus.js, IOS软件用户请使用NobyDa的 [JD_DailyBonus.js](https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js)
+2. 短期任务仅在特定时间有效,请自行在京东APP上查阅,恕不再另行说明。
-1. 京东水果([jd_fruit.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js))
-2. 东东萌宠([jd_pet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js))
-4. 种豆得豆([jd_plantBean.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js))
-5. 天天加速([jd_speed.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js))
-6. 摇钱树([jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js))
-6. 宠汪汪([jd_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js))
-7. 宠汪汪偷好友狗粮与积分([jd_joy_steal.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js))
-8. 宠汪汪单独喂食([jd_joy_feedPets.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js))
-9. 宠汪汪兑换奖品([jd_joy_reward.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js))
-10. 宠汪汪强制为好友助力(刷好友)([jd_joy_help.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js))
-11. 宠汪汪赛跑助力([jd_joy_run.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js))
-12. 宠汪汪聚宝盆辅助脚本([jd_petTreasureBox.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js))
-13. 取关京东店铺和商品([jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js))
-14. 东东超市([jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js))
-15. 东东超市兑换奖品([jd_blueCoin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js))
-16. 进店领豆([jd_shop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js))
-17. 摇京豆([jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js))
-18. 全名开红包([jd_redPacket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js))
-19. 京东多合一签到([jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_sign.js)) 【可N个京东账号,Node.js专用,核心脚本是JD_DailyBonus.js,iOS软件用户请使用NobyDa的 [JD_DailyBonus.js](https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js) 】
-20. 京豆变动通知([jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js))
-21. 京喜工厂([jd_dreamFactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js))
-22. 东东小窝([jd_small_home.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js))
-23. 东东工厂([jd_jdfactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js))
-24. 点点券([jd_necklace.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js))
-25. 十元街([jd_syj.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js))
-26. 京东金融-天天提鹅([jd_daily_egg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_daily_egg.js))
-27. 京东金融-养猪猪([jd_pigPet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pigPet.js))
-28. 以及其他一部分在特定时间可用的薅京豆脚本:[手机狂欢城](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js) 、[星推官](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js) 、[双十一活动领金币](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_collectProduceScore.js) 、[热8超级盲盒](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_mohe.js)
-29. Webhook触发Action([webhook.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/webhook.js))
+| 活动时长 | 名称 | 脚本 |
+| ---- | ------------------------------ | -------------------------------------------------------------------------------------------------------- |
+| 长期 | 疯狂的joy | [jd_crazy_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js) |
+| 长期 | 京豆变动通知 | [jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js) |
+| 长期 | 京东多合一签到 | [jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_sign.js) |
+| 长期 | 东东超市兑换奖品 | [jd_blueCoin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js) |
+| 长期 | 摇京豆 | [jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js) |
+| 长期 | 东东农场 | [jd_fruit.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js) |
+| 长期 | 宠汪汪 | [jd_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js) |
+| 长期 | 宠汪汪单独喂食 | [jd_joy_feedPets.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js) |
+| 长期 | 宠汪汪强制为好友助力(iOS端专用) | [jd_joy_help.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js) |
+| 长期 | 宠汪汪聚宝盆辅助脚本(iOS端专用) | [jd_petTreasureBox.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js) |
+| 长期 | 宠汪汪兑换奖品 | [jd_joy_reward.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js) |
+| 长期 | 宠汪汪赛跑助力 | [jd_joy_run.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js) |
+| 长期 | 宠汪汪偷好友狗粮与积分 | [jd_joy_steal.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js) |
+| 长期 | 摇钱树 | [jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js) |
+| 长期 | 东东萌宠 | [jd_pet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js) |
+| 长期 | 金融养猪 | [jd_pigPet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pigPet.js) |
+| 长期 | 天天提鹅 | [jd_daily_egg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_daily_egg.js) |
+| 长期 | 种豆得豆 | [jd_plantBean.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js) |
+| 长期 | 全民开红包 | [jd_redPacket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js) |
+| 长期 | 进店领豆 | [jd_shop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js) |
+| 长期 | 天天加速 | [jd_speed.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js) |
+| 长期 | 京东快递 | [jd_kd.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js) |
+| 长期 | 东东超市 | [jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js) |
+| 长期 | 京喜工厂 | [jd_dreamFactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js) |
+| 长期 | 东东工厂 | [jd_jdfactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js) |
+| 长期 | 东东小窝 | [jd_small_home.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js) |
+| 长期 | 点点券 | [jd_necklace.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js) |
+| 长期 | 十元街 | [jd_syj.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js) |
+| 长期 | 京东代属 | [jd_ds.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js) |
+| 长期 | 取关京东店铺和商品 | [jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js) |
+| 短期 | 星推官 | [jd_xtg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js) |
+| 短期 | 手机狂欢城 | [jd_818.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js) |
搬运脚本
1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js))
@@ -58,7 +66,7 @@
**脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js**
**TODO**
-
+- [ ] 所有活动互助码在一个脚本打印
## 食用方法
From 490c06aabaa950c8381e82ad4d8508a455a1a8c9 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 17:06:13 +0800
Subject: [PATCH 014/105] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=82=E6=9C=BA?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_crazy_joy_coin.js | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js
index 00f394ba..4e4a5a3b 100644
--- a/jd_crazy_joy_coin.js
+++ b/jd_crazy_joy_coin.js
@@ -412,12 +412,17 @@ function getCoin() {
if (data.data && data.data.tryMoneyJoyBeans) {
console.log(`分红狗生效中,预计获得 ${data.data.tryMoneyJoyBeans} 京豆奖励`)
}
- if (data.data && data.data.totalCoinAmount)
- $.coin = data.data.totalCoinAmount
+ if (data.data && data.data.totalCoinAmount) {
+ $.coin = data.data.totalCoinAmount;
+ } else {
+ $.coin = `获取当前金币数量失败`
+ }
if (data.data && data.data.luckyBoxRecordId) {
await openBox('LUCKY_BOX_DROP',data.data.luckyBoxRecordId)
- } else
- $.log(`产出金币信息获取失败`)
+ }
+ if (data.data) {
+ $.log(`此次在线收益:获得 ${data.data['coins']} 金币`)
+ }
}
}
} catch (e) {
@@ -430,7 +435,6 @@ function getCoin() {
}
function openBox(eventType = 'LUCKY_BOX_DROP', boxId) {
- console.log(`openBox:${eventType}`)
let body = { eventType, "eventRecordId": boxId}
return new Promise(async resolve => {
$.get(taskUrl('crazyJoy_event_getVideoAdvert', JSON.stringify(body)), async (err, resp, data) => {
From b2a422a88ac1afbaa5a2e0369040a4eed86481fb Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 21:26:50 +0800
Subject: [PATCH 015/105] Update jd_speed.js
---
jd_speed.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_speed.js b/jd_speed.js
index 8c177e80..905cecc2 100644
--- a/jd_speed.js
+++ b/jd_speed.js
@@ -512,7 +512,7 @@ function getMemBerList() {
}
if ($.getRewardBeans > 0) {
$.msg(`${$.name}`, '', `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`);
- await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`)
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`)
}
} else {
console.log(`暂无可领取的虫洞京豆奖励`)
From 967f60f9cfaf37f2a37b367050049f789469ea0a Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 21:29:23 +0800
Subject: [PATCH 016/105] Update jd_dreamFactory.js
---
jd_dreamFactory.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index 4c0b8fc5..5d33133e 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -569,7 +569,7 @@ function userInfo() {
if (nowTimes.getHours() % 6 === 0) {
//如按每小时运行一次,则此处将一天推送4次提醒
$.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
- await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`)
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`)
}
}
}
@@ -1253,17 +1253,17 @@ async function exchangeProNotify() {
// 一:在兑换超时这一天(2020/12/8 09:20:04)的前2小时内通知
if ((exchangeEndTime - nowTimes) <= 3600000 * 2) {
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture})
- await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
}
//二:在兑换超时日期前的时间一天通知三次(2020/12/6 9,10,11点,以及在2020/12/7 9,10,11点各通知一次)
if (nowHours === exchangeEndHours || nowHours === (exchangeEndHours + 1) || nowHours === (exchangeEndHours + 2)) {
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture})
- await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
}
} else {
//兑换已超时
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请重新选择商品生产\n【兑换截止时间】${$.exchangeEndTime}`, {'open-url': jxOpenUrl})
- await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请重新选择商品生产\n【兑换截止时间】${$.exchangeEndTime}`, { url: jxOpenUrl })
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请重新选择商品生产\n【兑换截止时间】${$.exchangeEndTime}`, { url: jxOpenUrl })
}
}
}
From 9fdc5ce62e16946dcee582a20a7ad5484fee7d1e Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 25 Dec 2020 22:21:33 +0800
Subject: [PATCH 017/105] Update qqread.js
---
backUp/qqread.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backUp/qqread.js b/backUp/qqread.js
index e2db6bd6..f72fe1f4 100644
--- a/backUp/qqread.js
+++ b/backUp/qqread.js
@@ -235,7 +235,7 @@ async function QQ_READ() {
function showmsg() {
return new Promise(async resolve => {
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
- if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 20)) {
+ if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 15)) {
await notify.sendNotify(jsname, tz);
}
$.msg(jsname, "", tz);
From 8d78d274bc7eb374952def9dda8c4d1c8ff80680 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 14:01:34 +0800
Subject: [PATCH 018/105] fix
---
jd_pet.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jd_pet.js b/jd_pet.js
index 1446989d..9b19c20f 100644
--- a/jd_pet.js
+++ b/jd_pet.js
@@ -1,6 +1,6 @@
/*
东东萌宠 更新地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js
-更新时间:2020-11-30
+更新时间:2020-12-26
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -90,7 +90,7 @@ async function jdPet() {
}
if (!$.petInfo.goodsInfo) {
$.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`, { "open-url": "openapp.jdmoble://" });
- await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`);
+ if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`);
return
}
goodsUrl = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsUrl;
From a01e6a16fb679271d0c535696a691a4ef94f120c Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 14:29:59 +0800
Subject: [PATCH 019/105] =?UTF-8?q?=E6=B3=A8=E9=94=80=E4=BA=AC=E4=B8=9C?=
=?UTF-8?q?=E5=BA=97=E9=93=BA=E4=BC=9A=E5=91=98=E5=8D=A1=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?,=E6=89=8B=E6=9C=BA=E7=AB=AF=E6=B7=BB=E5=8A=A0BoxJs=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_jdfactory.js | 176 +++++++++++++++++++++++----------------------
jd_unbind.js | 35 +++++----
lxk0301.boxjs.json | 38 ++++++++++
3 files changed, 144 insertions(+), 105 deletions(-)
diff --git a/jd_jdfactory.js b/jd_jdfactory.js
index b1d7a45f..5f16249c 100644
--- a/jd_jdfactory.js
+++ b/jd_jdfactory.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-12-06 18:19:21
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-12-06 22:58:02
+ * @Last Modified time: 2020-12-26 22:58:02
*/
/*
东东工厂,不是京喜工厂
@@ -254,98 +254,100 @@ async function helpFriends() {
}
}
async function doTask() {
- for (let item of $.taskVos) {
- if (item.taskType === 1) {
- //关注店铺任务
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- for (let task of item.followShopVo) {
- if (task.status === 1) {
- await jdfactory_collectScore(task.taskToken);
- }
- }
- } else {
- console.log(`${item.taskName}已做完`)
- }
- }
- if (item.taskType === 2) {
- //看看商品任务
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- for (let task of item.productInfoVos) {
- if (task.status === 1) {
- await jdfactory_collectScore(task.taskToken);
- }
- }
- } else {
- console.log(`${item.taskName}已做完`)
- }
- }
- if (item.taskType === 3) {
- //逛会场任务
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- for (let task of item.shoppingActivityVos) {
- if (task.status === 1) {
- await jdfactory_collectScore(task.taskToken);
- }
- }
- } else {
- console.log(`${item.taskName}已做完`)
- }
- }
- if (item.taskType === 10) {
- if (item.status === 1) {
- if (item.threeMealInfoVos[0].status === 1) {
- //可以做此任务
+ if ($.taskVos && $.taskVos.length > 0) {
+ for (let item of $.taskVos) {
+ if (item.taskType === 1) {
+ //关注店铺任务
+ if (item.status === 1) {
console.log(`准备做此任务:${item.taskName}`);
- await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken);
- } else if (item.threeMealInfoVos[0].status === 0) {
- console.log(`${item.taskName} 任务已错过时间`)
+ for (let task of item.followShopVo) {
+ if (task.status === 1) {
+ await jdfactory_collectScore(task.taskToken);
+ }
+ }
+ } else {
+ console.log(`${item.taskName}已做完`)
}
- } else if (item.status === 2){
- console.log(`${item.taskName}已完成`);
}
- }
- if (item.taskType === 21) {
- //开通会员任务
- if (item.status === 1) {
- console.log(`此任务:${item.taskName},跳过`);
- // for (let task of item.brandMemberVos) {
- // if (task.status === 1) {
- // await jdfactory_collectScore(task.taskToken);
- // }
- // }
- } else {
- console.log(`${item.taskName}已做完`)
+ if (item.taskType === 2) {
+ //看看商品任务
+ if (item.status === 1) {
+ console.log(`准备做此任务:${item.taskName}`);
+ for (let task of item.productInfoVos) {
+ if (task.status === 1) {
+ await jdfactory_collectScore(task.taskToken);
+ }
+ }
+ } else {
+ console.log(`${item.taskName}已做完`)
+ }
}
- }
- if (item.taskType === 13) {
- //每日打卡
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
- } else {
- console.log(`${item.taskName}已完成`);
+ if (item.taskType === 3) {
+ //逛会场任务
+ if (item.status === 1) {
+ console.log(`准备做此任务:${item.taskName}`);
+ for (let task of item.shoppingActivityVos) {
+ if (task.status === 1) {
+ await jdfactory_collectScore(task.taskToken);
+ }
+ }
+ } else {
+ console.log(`${item.taskName}已做完`)
+ }
}
- }
- if (item.taskType === 14) {
- //好友助力
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- // await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
- } else {
- console.log(`${item.taskName}已完成`);
+ if (item.taskType === 10) {
+ if (item.status === 1) {
+ if (item.threeMealInfoVos[0].status === 1) {
+ //可以做此任务
+ console.log(`准备做此任务:${item.taskName}`);
+ await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken);
+ } else if (item.threeMealInfoVos[0].status === 0) {
+ console.log(`${item.taskName} 任务已错过时间`)
+ }
+ } else if (item.status === 2){
+ console.log(`${item.taskName}已完成`);
+ }
}
- }
- if (item.taskType === 23) {
- //从数码电器首页进入
- if (item.status === 1) {
- console.log(`准备做此任务:${item.taskName}`);
- await queryVkComponent();
- await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
- } else {
- console.log(`${item.taskName}已完成`);
+ if (item.taskType === 21) {
+ //开通会员任务
+ if (item.status === 1) {
+ console.log(`此任务:${item.taskName},跳过`);
+ // for (let task of item.brandMemberVos) {
+ // if (task.status === 1) {
+ // await jdfactory_collectScore(task.taskToken);
+ // }
+ // }
+ } else {
+ console.log(`${item.taskName}已做完`)
+ }
+ }
+ if (item.taskType === 13) {
+ //每日打卡
+ if (item.status === 1) {
+ console.log(`准备做此任务:${item.taskName}`);
+ await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
+ } else {
+ console.log(`${item.taskName}已完成`);
+ }
+ }
+ if (item.taskType === 14) {
+ //好友助力
+ if (item.status === 1) {
+ console.log(`准备做此任务:${item.taskName}`);
+ // await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
+ } else {
+ console.log(`${item.taskName}已完成`);
+ }
+ }
+ if (item.taskType === 23) {
+ //从数码电器首页进入
+ if (item.status === 1) {
+ console.log(`准备做此任务:${item.taskName}`);
+ await queryVkComponent();
+ await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken);
+ } else {
+ console.log(`${item.taskName}已完成`);
+ }
}
}
}
diff --git a/jd_unbind.js b/jd_unbind.js
index 0e618a02..65e5377f 100644
--- a/jd_unbind.js
+++ b/jd_unbind.js
@@ -36,9 +36,9 @@ if ($.isNode()) {
cookiesArr.reverse();
cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
}
-const jdNotify = $.getdata('jdUnsubscribeNotify');//是否关闭通知,false打开通知推送,true关闭通知推送
-let cardPageSize = $.getdata('jdUnsubscribePageSize') || 200;// 运行一次取消多少个会员卡。数字0表示不注销任何会员卡
-let stopCards = $.getdata('jdUnsubscribeStopCards') || ['京东PLUS会员'];//遇到此会员卡不再进行注销
+const jdNotify = $.getdata('jdUnbindCardNotify');//是否关闭通知,false打开通知推送,true关闭通知推送
+let cardPageSize = 200;// 运行一次取消多少个会员卡。数字0表示不注销任何会员卡
+let stopCards = `京东PLUS会员`;//遇到此会员卡跳过注销,多个使用&分开
const JD_API_HOST = 'https://api.m.jd.com/';
!(async () => {
if (!cookiesArr[0]) {
@@ -220,24 +220,23 @@ function TotalBean() {
}
function requireConfig() {
return new Promise(resolve => {
- if ($.isNode() && process.env.UN_BIND_CARD_NUM) {
- $.UN_BIND_NUM = process.env.UN_BIND_CARD_NUM
- }
- if ($.isNode() && process.env.UN_BIND_STOP_CARD) {
- if (process.env.UN_BIND_STOP_CARD.indexOf('&') > -1) {
- $.UN_BIND_STOP_CARD = process.env.UN_BIND_STOP_CARD.split('&');
- } else if (process.env.UN_BIND_STOP_CARD.indexOf('@') > -1) {
- $.UN_BIND_STOP_CARD = process.env.UN_BIND_STOP_CARD.split('@');
- } else if (process.env.UN_BIND_STOP_CARD.indexOf('\n') > -1) {
- $.UN_BIND_STOP_CARD = process.env.UN_BIND_STOP_CARD.split('\n');
- } else if (process.env.UN_BIND_STOP_CARD.indexOf('\\n') > -1) {
- $.UN_BIND_STOP_CARD = process.env.UN_BIND_STOP_CARD.split('\\n');
+ $.UN_BIND_NUM = $.isNode() ? (process.env.UN_BIND_CARD_NUM ? process.env.UN_BIND_CARD_NUM : cardPageSize) : ($.getdata('UN_BIND_CARD_NUM') ? $.getdata('UN_BIND_CARD_NUM') : cardPageSize);
+ $.UN_BIND_STOP_CARD = $.isNode() ? (process.env.UN_BIND_STOP_CARD ? process.env.UN_BIND_STOP_CARD : stopCards) : ($.getdata('UN_BIND_STOP_CARD') ? $.getdata('UN_BIND_STOP_CARD') : stopCards);
+ if ($.UN_BIND_STOP_CARD) {
+ if ($.UN_BIND_STOP_CARD.indexOf('&') > -1) {
+ $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('&');
+ } else if ($.UN_BIND_STOP_CARD.indexOf('@') > -1) {
+ $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('@');
+ } else if ($.UN_BIND_STOP_CARD.indexOf('\n') > -1) {
+ $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\n');
+ } else if ($.UN_BIND_STOP_CARD.indexOf('\\n') > -1) {
+ $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\\n');
} else {
- $.UN_BIND_STOP_CARD = process.env.UN_BIND_STOP_CARD.split();
+ $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split();
}
}
- cardPageSize = $.UN_BIND_NUM || cardPageSize
- stopCards = $.UN_BIND_STOP_CARD || stopCards
+ cardPageSize = $.UN_BIND_NUM;
+ stopCards = $.UN_BIND_STOP_CARD;
resolve()
})
}
diff --git a/lxk0301.boxjs.json b/lxk0301.boxjs.json
index 842a61dd..dc9e0e5a 100644
--- a/lxk0301.boxjs.json
+++ b/lxk0301.boxjs.json
@@ -664,6 +664,44 @@
"https://raw.githubusercontent.com/Orz-3/task/master/jd.png"
]
},
+ {
+ "id": "jd_unbind",
+ "name": "注销京东会员卡",
+ "keys": [
+ "UN_BIND_CARD_NUM",
+ "UN_BIND_STOP_CARD"
+ ],
+ "settings": [
+ {
+ "id": "jdUnbindCardNotify",
+ "name": "静默运行",
+ "val": false,
+ "type": "boolean",
+ "desc": "运行脚本时不发出系统弹窗通知"
+ },
+ {
+ "id": "UN_BIND_CARD_NUM",
+ "name": "注销京东店铺会员卡的数量",
+ "val": 200,
+ "type": "number",
+ "desc": "运行一次脚本注销多少个店铺会员卡(默认200个,输入0表示不注销会员卡)"
+ },
+ {
+ "id": "UN_BIND_STOP_CARD",
+ "name": "注销京东店铺会员卡(白名单)",
+ "val": "",
+ "type": "text",
+ "desc": "不想注销的店铺会员卡名称"
+ }
+ ],
+ "author": "@lxk0301",
+ "repo": "https://github.com/lxk0301/jd_scripts",
+ "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js",
+ "icons": [
+ "https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind_mini.png",
+ "https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png"
+ ]
+ },
{
"id": "jd_SuperMarket",
"name": "京小超",
From 738633c52872edd74a7b953c069253735f2beec5 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 14:59:57 +0800
Subject: [PATCH 020/105] debug
---
jd_crazy_joy.js | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js
index f85bb81d..38165fb3 100644
--- a/jd_crazy_joy.js
+++ b/jd_crazy_joy.js
@@ -16,10 +16,10 @@ crazyJoy任务
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=crazyJoy任务
===============Surge=================
-crazyJoy任务 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js
+crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js
============小火箭=========
-crazyJoy任务 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, cronexpr="10 * * * *", timeout=200, enable=true
+crazyJoy任务 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, cronexpr="10 7 * * *", timeout=200, enable=true
*/
@@ -36,7 +36,7 @@ const inviteCodes = [
'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE',
'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE'
];
-const randomCount = 5;
+const randomCount = $.isNode() ? 10 : 5;
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
@@ -175,7 +175,8 @@ if ($.isNode()) {
return;
}
await requireConfig();
- $.nextCode = "EdLPh8A6X5G1iWXu-uPYfA=="
+ $.nextCode = ["EdLPh8A6X5G1iWXu-uPYfA==", "nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s"];
+ $.nextCode = $.nextCode[randomNumber(0, $.nextCode.length)];
$.selfCodes = []
for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) {
@@ -258,7 +259,7 @@ async function jdCrazyJoy() {
$.bean = 0
await getUserInfo($.nextCode)
await doSign()
- // 帮助作者
+ // 助力好友
await helpFriends()
await doTasks()
await getCoin()
@@ -495,7 +496,13 @@ function helpFriend(code) {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- console.log(data.resultTips)
+ if (data['resultCode'] ==='0') {
+ console.log(`助力信息:${JSON.stringify(data)}`);
+ } else if (data['resultCode'] === '2000402') {
+ console.log(data.resultTips)
+ } else {
+ console.log(`助力异常:${JSON.stringify(data)}`);
+ }
}
}
} catch (e) {
@@ -719,5 +726,13 @@ function jsonParse(str) {
}
}
}
+/**
+ * 生成随机数字
+ * @param {number} min 最小值(包含)
+ * @param {number} max 最大值(不包含)
+ */
+function randomNumber(min = 0, max = 100) {
+ return Math.min(Math.floor(min + Math.random() * (max - min)), max);
+}
// prettier-ignore
function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
From 2d960f3666c74f335d230ad619584946f2fa9030 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 15:37:16 +0800
Subject: [PATCH 021/105] =?UTF-8?q?fix,=E4=BA=AC=E5=96=9C=E5=B7=A5?=
=?UTF-8?q?=E5=8E=82=E6=B4=BB=E5=8A=A8=E5=BB=B6=E9=95=BF,=E6=88=AA?=
=?UTF-8?q?=E6=AD=A2=E6=97=B6=E9=97=B4=E5=88=B02021-12-31=E6=97=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_dreamFactory.js | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index 5d33133e..e81aad66 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -31,7 +31,7 @@ const JD_API_HOST = 'https://m.jingxi.com';
const notify = $.isNode() ? require('./sendNotify') : '';
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
const randomCount = $.isNode() ? 20 : 5;
-const tuanActiveId = `6S9y4sJUfA2vPQP6TLdVIQ==`;
+let tuanActiveId = `6S9y4sJUfA2vPQP6TLdVIQ==`;
const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`;
let cookiesArr = [], cookie = '', message = '';
const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg=='];
@@ -1018,17 +1018,19 @@ function CreateTuan() {
})
}
async function joinLeaderTuan() {
- await updateTuanIds();
- if (!$.tuanIdS) await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json');
- if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateFactoryTuanId.json');
- for (let tuanId of $.tuanIdS.tuanIds) {
- if (!tuanId) continue
- await JoinTuan(tuanId);
+ if ($.tuanIdS && $.tuanIdS.tuanIds) {
+ for (let tuanId of $.tuanIdS.tuanIds) {
+ if (!tuanId) continue
+ await JoinTuan(tuanId);
+ }
}
+ $.tuanIdS = null;
if (!$.tuanIdS) await updateTuanIdsCDN('https://gitee.com/shylocks/updateTeam/raw/main/jd_updateFactoryTuanId.json');
- for (let tuanId of $.tuanIdS.tuanIds) {
- if (!tuanId) continue
- await JoinTuan(tuanId);
+ if ($.tuanIdS && $.tuanIdS.tuanIds) {
+ for (let tuanId of $.tuanIdS.tuanIds) {
+ if (!tuanId) continue
+ await JoinTuan(tuanId);
+ }
}
}
function JoinTuan(tuanId) {
@@ -1338,8 +1340,15 @@ function shareCodesFormat() {
})
}
function requireConfig() {
- return new Promise(resolve => {
+ return new Promise(async resolve => {
+ await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json');
+ if (!$.tuanIdS) await updateTuanIds();
+ if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateFactoryTuanId.json');
+ if ($.tuanIdS && $.tuanIdS.tuanActiveId) {
+ tuanActiveId = $.tuanIdS.tuanActiveId;
+ }
console.log(`开始获取${$.name}配置文件\n`);
+ console.log(`tuanActiveId: ${tuanActiveId}`)
//Node.js用户请在jdCookie.js处填写京东ck;
const shareCodes = $.isNode() ? require('./jdDreamFactoryShareCodes.js') : '';
console.log(`共${cookiesArr.length}个京东账号\n`);
From c9a1a0e0572c28b5c40610248f6f99f816dd24fe Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 16:24:52 +0800
Subject: [PATCH 022/105] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E9=A2=86=E5=8F=96=E8=A7=A3=E9=94=81=E7=AD=89=E7=BA=A7=E5=A5=96?=
=?UTF-8?q?=E5=8A=B1(=E4=BA=AC=E8=B1=86)=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_crazy_joy.js | 92 +++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 82 insertions(+), 10 deletions(-)
diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js
index 38165fb3..87436dcf 100644
--- a/jd_crazy_joy.js
+++ b/jd_crazy_joy.js
@@ -185,6 +185,7 @@ if ($.isNode()) {
$.index = i + 1;
$.isLogin = true;
$.nickName = '';
+ $.GROWTH_REWARD_BEAN = 0;//解锁等级奖励的京豆
await TotalBean();
console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`);
if (!$.isLogin) {
@@ -262,19 +263,23 @@ async function jdCrazyJoy() {
// 助力好友
await helpFriends()
await doTasks()
+ await getGrowthReward();//领取解锁的等级奖励
await getCoin()
await getUserBean()
- console.log(`当前信息:${$.bean} 京豆,${$.coin} 金币`)
if ( applyJdBean!==0 && applyJdBean<=$.bean){
await $.wait(1000)
console.log(`检测您打开了自动兑换开关,去兑换京豆`)
await doApplyJdBean(applyJdBean)
}
+ await showMsg();
}
async function doTasks() {
await getTaskInfo()
for (let j = 0; j < $.taskList.length; ++j) {
- let task = $.taskList[j]
+ let task = $.taskList[j];
+ if (task['taskTypeId'] === 102) {
+ message += `${task.taskTitle}:${task['doneTimes']}/${task.ext.count}\n`;
+ }
if (task.status === 0 && task.taskTypeId === 103)
for (let i = task.doneTimes; i < task.ext.count; ++i) {
await doTask(task.taskId)
@@ -295,10 +300,12 @@ function doApplyJdBean(bean = 1000) {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- if (data.success)
+ if (data.success) {
console.log(`兑换${bean}京豆成功`)
- else
+ message += `兑换京豆:${bean}京豆成功\n`;
+ } else {
console.log(`兑换${bean}京豆失败,错误信息:${data.resultTips||data.message}`)
+ }
}
}
} catch (e) {
@@ -324,6 +331,7 @@ function getUserInfo(code = "EdLPh8A6X5G1iWXu-uPYfA==") {
console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data.data.userInviteCode}`)
$.selfCodes.push(data.data.userInviteCode)
$.nextCode = data.data.userInviteCode
+ message += `${data.data['nickName']}:${data.data['userTopLevelJoyId']}级JOY\n`;
}
else
console.log(`用户信息获取失败`)
@@ -360,7 +368,7 @@ function getTaskInfo() {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.success && data.data && data.data.length) {
- $.taskList = data.data
+ $.taskList = data.data;
} else {
console.log(`任务信息获取失败`)
}
@@ -497,7 +505,7 @@ function helpFriend(code) {
if (safeGet(data)) {
data = JSON.parse(data);
if (data['resultCode'] ==='0') {
- console.log(`助力信息:${JSON.stringify(data)}`);
+ console.log(`助力结果:${JSON.stringify(data)}`);
} else if (data['resultCode'] === '2000402') {
console.log(data.resultTips)
} else {
@@ -549,8 +557,9 @@ function getCoin() {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- if (data.data && data.data.totalCoinAmount)
- $.coin = data.data.totalCoinAmount
+ if (data.data && data.data.totalCoinAmount) {
+ $.coin = data.data.totalCoinAmount;
+ }
}
}
} catch (e) {
@@ -561,8 +570,71 @@ function getCoin() {
})
})
}
-
-
+//领取解锁等级奖励(京豆)
+function getGrowthReward() {
+ return new Promise(async resolve => {
+ const body = { "paramData":{"eventType":"GROWTH_REWARD"} };
+ $.get(taskUrl('crazyJoy_event_getGrowthAndSceneState', JSON.stringify(body)), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data['resultCode'] === '0') {
+ if (data.data) {
+ for (let item of data.data) {
+ if (item.status === 1) {
+ if (item.eventRecordId) await obtainAward(item.eventRecordId);
+ }
+ }
+ if ($.GROWTH_REWARD_BEAN > 0) {
+ message += `解锁等级奖励:获得${$.GROWTH_REWARD_BEAN}京豆\n`;
+ }
+ }
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function obtainAward(eventRecordId) {
+ return new Promise(async resolve => {
+ const body = {"eventType": "GROWTH_REWARD", eventRecordId};
+ $.get(taskUrl('crazyJoy_event_obtainAward', JSON.stringify(body)), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data['resultCode'] === '0') {
+ $.GROWTH_REWARD_BEAN += data.data['beans'];
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function showMsg() {
+ return new Promise(async resolve => {
+ message += `当前信息:${$.bean}京豆,${$.coin}金币`
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`)
+ resolve()
+ })
+}
function taskUrl(functionId, body = '') {
let t = Date.now().toString().substr(0, 10)
let e = body || ""
From e213ec76cb534408776e3de13eac1d413a8f7f4d Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 26 Dec 2020 17:00:33 +0800
Subject: [PATCH 023/105] Update jd_crazy_joy.js
---
jd_crazy_joy.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js
index 87436dcf..a87e8711 100644
--- a/jd_crazy_joy.js
+++ b/jd_crazy_joy.js
@@ -185,6 +185,7 @@ if ($.isNode()) {
$.index = i + 1;
$.isLogin = true;
$.nickName = '';
+ message = '';
$.GROWTH_REWARD_BEAN = 0;//解锁等级奖励的京豆
await TotalBean();
console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`);
From d20d3a6854445a2391100e8d5ade25859b5a5226 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Sun, 27 Dec 2020 12:02:08 +0800
Subject: [PATCH 024/105] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=AC=E4=B8=9C?=
=?UTF-8?q?=E6=B1=BD=E8=BD=A6=E7=AD=BE=E5=88=B0=E6=97=B6=E9=97=B4=EF=BC=8C?=
=?UTF-8?q?=E6=96=B9=E4=BE=BF=E5=85=91=E6=8D=A2=E4=BA=AC=E8=B1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
更改京东汽车签到时间,方便兑换京豆
---
serverless.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/serverless.yml b/serverless.yml
index 3a81ce08..98a0be61 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -19,15 +19,15 @@ inputs:
- timer: # 签到
parameters:
name: jd_bean_sign
- cronExpression: "0 0 0,7 * * * *"
- enable: true
- argument: jd_bean_sign
- - timer: # 京小超兑换奖品# 摇京豆
- parameters:
- name: jd_blueCoin_jd_club_lottery
cronExpression: "0 0 0 * * * *"
enable: true
- argument: jd_blueCoin&jd_club_lottery
+ argument: jd_bean_sign
+ - timer: #京小超兑换奖品 #摇京豆 #京东汽车
+ parameters:
+ name: jd_blueCoin_jd_club_lottery_car
+ cronExpression: "0 0 0 * * * *"
+ enable: true
+ argument: jd_blueCoin&jd_club_lottery&jd_car
- timer: # 东东农场# 东东萌宠
parameters:
name: jd_fruit_jd_pet
@@ -64,9 +64,9 @@ inputs:
cronExpression: "0 15 * * * * *"
enable: true
argument: jd_superMarket
- - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励 #京东汽车 #京东健康APP
+ - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励 #京东健康APP
parameters:
- name: bean_change_crazy_joy_rankingList_bean_home_car_jdh
+ name: bean_change_crazy_joy_rankingList_bean_home_jdh
cronExpression: "0 30 7 * * * *"
enable: true
argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car&jd_jdh
From bb0ca8916f566ecf9b09b1516b75a47a3435a383 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 12:26:33 +0800
Subject: [PATCH 025/105] Update jd_dreamFactory.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
京喜工作 调整未选择商品生产时的通知频率
---
jd_dreamFactory.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index e81aad66..2333f2f8 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -1,6 +1,6 @@
/*
京东京喜工厂
-更新时间:2020-12-07
+更新时间:2020-12-27
活动入口 :京东APP->游戏与互动->查看更多->京喜工厂
或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可
@@ -566,8 +566,8 @@ function userInfo() {
} else if (data.factoryList && !data.productionList) {
console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`)
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
- if (nowTimes.getHours() % 6 === 0) {
- //如按每小时运行一次,则此处将一天推送4次提醒
+ if (nowTimes.getHours() % 12 === 0) {
+ //如按每小时运行一次,则此处将一天推送2次提醒
$.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`)
}
From 2dc69a74dc6365e986eb51e43e00b4b8c2cb2e15 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 12:34:11 +0800
Subject: [PATCH 026/105] Update JD_extra_cookie.js
---
JD_extra_cookie.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/JD_extra_cookie.js b/JD_extra_cookie.js
index f1eed495..c0d71f5b 100644
--- a/JD_extra_cookie.js
+++ b/JD_extra_cookie.js
@@ -8,10 +8,9 @@ Github: https://github.com/dompling
===================
特别说明:
1.获取多个京东cookie文件,不和野比大佬的文件冲突。暂不支持野比大佬脚本签到。
-2.若是要使用京东多合一签到,请使用修改版地址:https://raw.githubusercontent.com/dompling/Script/master/jd/JD_extra.js
===================
===================
-使用方式:复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie,
+使用方式:在代理软件配置好下方配置后,复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie,
若弹出成功则正常使用。否则继续再此页面继续刷新一下试试
===================
From 4eaa1dda76e2e984b04aa110d50cf13b42c60ba5 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 12:41:12 +0800
Subject: [PATCH 027/105] Update JD_extra_cookie.js
---
JD_extra_cookie.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/JD_extra_cookie.js b/JD_extra_cookie.js
index c0d71f5b..504eda2d 100644
--- a/JD_extra_cookie.js
+++ b/JD_extra_cookie.js
@@ -7,7 +7,7 @@ Github: https://github.com/dompling
===================
特别说明:
-1.获取多个京东cookie文件,不和野比大佬的文件冲突。暂不支持野比大佬脚本签到。
+1.获取多个京东cookie的脚本,不和NobyDa的京东cookie冲突。
===================
===================
使用方式:在代理软件配置好下方配置后,复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie,
From f6dc2abf2eda365617653444214c32ec43a9d632 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 12:48:35 +0800
Subject: [PATCH 028/105] Update README.md
---
README.md | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/README.md b/README.md
index fb8d8eee..46b8e821 100644
--- a/README.md
+++ b/README.md
@@ -105,26 +105,7 @@
### 方法四:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭)
-#### 以下内容只针对iOS用户
-
-#### ios使用多个京东账号,需要使用BoxJs保存多会话进行切换
-
-##### BoxJs简单说明可看作者[BoxJs仓库地址](https://github.com/chavyleung/scripts/)
-
-使用box可以实现远程订阅助力好友(需订阅此 [链接](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/lxk0301.boxjs.json))
-
-- [BoxJs使用教程](https://chavyleung.gitbook.io/boxjs/)
-
-- [BoxJs教程视频](https://youtu.be/eIpBrRxiy0w)
-
-
-【用box订阅的好处】
-
- 1、脚本也可以远程挂载。京东活动助力功能的分享码只需在box里面填写。以后只需远程更新就行。
-
- 2、所有脚本的cookie都可以备份,方便你迁移到其他支持box的软件。
-
- 3、box可以支持多账号
+#### [京东cookie获取脚本](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js)
### 赞赏码(开发维护不易,请赏杯茶水费)

From 23c6ce1ad0a4710ffb2b6dea135ae567773572e3 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 14:08:01 +0800
Subject: [PATCH 029/105] Update lxk0301_Task.sgmodule.sgmodule
---
Surge/lxk0301_Task.sgmodule.sgmodule | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 2be5a205..08b3479b 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -32,7 +32,7 @@ cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
#京小超
cron "11 1-23/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,timeout=530, wake-system=1, tag=京小超
京小超兑换奖品
-cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,timeout=130, wake-system=1, tag=京小超兑换奖品
+cron "0,30 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,timeout=130, wake-system=1, tag=京小超兑换奖品
#取关京东店铺商品
cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,timeout=250, wake-system=1, tag=取关京东店铺商品
#进店领豆
From c31031bcfff8cadf0a712bb60e57724c01afdb8b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 14:08:37 +0800
Subject: [PATCH 030/105] Update lxk0301_LoonTask.conf
---
Loon/lxk0301_LoonTask.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index b334fd30..8f236711 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -37,7 +37,7 @@ cron "3 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
cron "11 1-23/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,tag=京小超
# 京小超兑换奖品
-cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品
+cron "0,30 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品
# 取关京东店铺商品
cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品
@@ -122,4 +122,4 @@ cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_s
# 健康抽奖机
cron "10 0 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
# 疯狂的joy日常任务
-cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
\ No newline at end of file
+cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
From eed598e1bb1acfda26837db7bede038061abcacd Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 14:09:37 +0800
Subject: [PATCH 031/105] Update lxk0301_gallery.json
---
QuantumultX/lxk0301_gallery.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json
index 7bc2c286..162513d2 100644
--- a/QuantumultX/lxk0301_gallery.json
+++ b/QuantumultX/lxk0301_gallery.json
@@ -13,7 +13,7 @@
"15 */5 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js , tag=京东摇钱树 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png",
"5 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js , tag=摇京豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png",
"11 1-23/5 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js , tag=京小超 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png",
- "0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js , tag=京小超兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png",
+ "0,30 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js , tag=京小超兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png",
"55 23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js , tag=取关京东店铺商品 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
"10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js , tag=进店领豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png",
"15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js , tag=宠汪汪邀请助力与赛跑助力 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png",
From 0cbf098ac5049f35960fade94645acd8a842e3b8 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sun, 27 Dec 2020 14:10:28 +0800
Subject: [PATCH 032/105] Update crontab_list.sh
---
docker/crontab_list.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index c2510d14..046099de 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -19,9 +19,9 @@
##############长期活动##############
# 签到
-0 0,12,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
+0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
# 京小超兑换奖品
-0 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1
+0,30 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1
# 摇京豆
0 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1
# 东东农场
From 931b4ceaf33405ca5f23677617a2a149818f31f3 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 28 Dec 2020 18:25:47 +0800
Subject: [PATCH 033/105] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 46b8e821..8783d737 100644
--- a/README.md
+++ b/README.md
@@ -68,6 +68,8 @@
**TODO**
- [ ] 所有活动互助码在一个脚本打印
+## [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
+
## 食用方法
### 方法一:本地安装Node.js,下载本库脚本
From 1400b03160802f81414acb5e9298867c0cc60331 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Mon, 28 Dec 2020 20:09:48 +0800
Subject: [PATCH 034/105] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=91=E5=87=BD?=
=?UTF-8?q?=E6=95=B0=E6=95=99=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
更新云函数教程
---
iCloud.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/iCloud.md b/iCloud.md
index 4066d16d..9eb86134 100644
--- a/iCloud.md
+++ b/iCloud.md
@@ -149,6 +149,60 @@ let CookieJDs = [
目前repo中按照每个脚本一个定时器的方式设置到云函数中,大约需要触发器10多个,由于云函数触发器限制最多10个,需要对触发器进行整合,整合后触发器保持在10个以内,以下设置仅供参考
-
+| **JavaScript** | **脚本名称** | **活动时间** | **原Repository UTC时间** | **适用于云函数的北京时间** | **serverless.yml** |
+| :----------------------: | :----------------------: | :----------: | :-----------------------: | :-------------------------: | :----------------: |
+| `jd_bean_change` | 京豆变动通知 | 长期 | 0 2 * * * | 0 1 */1 * * | 30 7 * * * |
+| `jd_bean_home` | 领京豆额外奖励 | 长期 | / | 0 1 */1 * * | 30 7 * * * |
+| `jd_bean_sign` | 京豆签到 | 长期 | 0 16 * * * | 0 0 */1 * * | 0 0 * * * |
+| `jd_blueCoin` | 京小超兑换奖品 | 长期 | 0 16 * * * | 0 1 */1 * * | 0 0 * * * |
+| `jd_car` | 京东汽车 | 长期 | / | 0 0 */1 * * | 0 0 * * * |
+| `jd_club_lottery` | 摇京豆 | 长期 | 0 16 * * * | 0 0 */1 * * | 0 0 * * * |
+| `jd_crazy_joy` | 疯狂的joy | 长期 | / | / | 30 7 * * * |
+| `jd_crazy_joy_coin` | 疯狂的joy挂机 | 长期 | / | / | / |
+| `jd_daily_egg` | 京东金融-天天提额 | 长期 | 10 */3 * * * | 0-12/3 */3 * * * | 8 */3 * * * |
+| `jd_dreamFactory` | 京喜工厂 | 长期 | / | */30 * * * * | 3 */1 * * * |
+| `jd_ds` | 京东代属(校园用户) | 长期 | / | / | / |
+| `jd_fruit` | 东东农场 | 长期 | 20 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6 * * * |
+| `jd_health` | 健康抽奖机 | 短期 | / | 0 0 */1 * * | 10 0 * * * |
+| `jd_jdfactory` | 东东工厂 | 长期 | / | */30 * * * * | 3 */1 * * * |
+| `jd_jdh` | 京东健康APP | 短期 | / | / | 30 7 * * * |
+| `jd_jdzz` | 京东赚赚 | 长期 | / | / | 3 1 * * * |
+| `jd_joy` | 宠汪汪 | 长期 | 0 0,1,4,10,15,16 * * * | 0,5,10 8,9,12,18,23,0 * * * | 3 */1 * * * |
+| `jd_joy_feedPets` | 宠汪汪单独喂食 | 长期 | */20 */1 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_joy_help` | 宠汪汪强制为别人助力 | 长期 | / | / | / |
+| `jd_joy_reward` | 宠汪汪兑换奖品 | 长期 | 0 0,4,8,16 * * * | 0 8,12,16,0 */1 * * | 0 0-16/8,20 * * * |
+| `jd_joy_run` | 宠汪汪邀请助力与赛跑助力 | 长期 | / | / | / |
+| `jd_joy_steal` | 宠汪汪偷好友狗粮与积分 | 长期 | 0 16,22 * * * | 0 0,6,20 */1 * * | 0 0-16/8,20 * * * |
+| `jd_kd` | 京东快递 | 长期 | / | 0 1 */1 * * | 3 1 * * * |
+| `jd_live` | 京东直播18豆 | 长期 | / | / | 0 0-16/8,20 * * * |
+| `jd_live_redrain` | 超级直播间红包雨 | 短期 | / | 0 0,20,9-23/2 * * MON-FRI | / |
+| `jd_lotteryMachine` | 京东抽奖机 | 长期 | 11 17 * * * | 0 0 */1 * * | 10 0 * * * |
+| `jd_moneyTree` | 摇钱树 | 长期 | 40 */3 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_ms_redrain` | 秒杀红包雨 | 短期 | / | 0 1 */1 * * | 10 0 * * * |
+| `jd_necklace` | 点点券 | 长期 | / | 0 0,6,20 */1 * * | 0 0-16/8,20 * * * |
+| `jd_pet` | 东东萌宠 | 长期 | 35 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6 * * * |
+| `jd_petTreasureBox` | 宠汪汪聚宝盆 | 长期 | / | / | / |
+| `jd_pigPet` | 京东金融-养猪猪 | 长期 | / | 0-12/3 */3 * * * | 3 1 * * * |
+| `jd_plantBean` | 种豆得豆 | 长期 | 0 23,0-14/1 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_rankingList` | 京东排行榜 | 长期 | 11 18 * * * | 0 0 */1 * * | 30 7 * * * |
+| `jd_redPacket` | 全民开红包 | 长期 | 0 17 * * * | 0 1 */1 * * | 10 0 * * * |
+| `jd_shop` | 进店领豆 | 长期 | 0 16 * * * | 0 0 */1 * * | 10 0 * * * |
+| `jd_small_home` | 东东小窝 | 长期 | / | 0 0,6,20 */1 * * | 10 0 * * * |
+| `jd_speed` | 天天加速 | 长期 | 33 */3 * * * | 0-12/3 */3 * * * | 8 */3 * * * |
+| `jd_superMarket` | 东东超市 | 长期 | 15 * * * * | */30 * * * * | 15 * * * * |
+| `jd_syj` | 十元街 | 长期 | / | 0 1 */1 * * | 3 1 * * * |
+| `jd_unbind` | 注销京东会员卡 | 长期 | / | / | 10 0 * * * |
+| `jd_unsubscribe` | 取关京东店铺和商品 | 长期 | 45 15 * * * | 0 1 */1 * * | 10 0 * * * |
+| `jd_watch` | 发现-看一看 | 长期 | / | / | 3 1 * * * |
+| `jr_sign` | 金融打卡年终奖 | 短期 | / | / | 3 1 * * * |
+| `jd_818` | 京东手机狂欢城 | 短期 | 0 1,4,7,10,12,16,22 * * * | 0 9,12,15,16,20,0,6 */1 * * | / |
+| `jd_apple_live` | 苹果抽奖机 | 短期 | / | / | / |
+| `jd_collectProduceScore` | 双十一活动领金币 | 短期 | 30 * * * * | */30 * * * * | / |
+| `jd_digital_floor` | 数码加购京豆 | 短期 | / | / | / |
+| `jd_jxstory` | 京喜故事 | 短期 | / | / | / |
+| `jd_mohe` | 热8超级魔盒 | 短期 | / | / | / |
+| `jd_pubg` | PUBG | 短期 | / | / | / |
+| `jd_split` | 金榜年终奖 | 短期 | / | / | / |
+| `jd_xtg` | 双十一星推官 | 短期 | 0 16 * * * | 0 0 */1 * * | / |
点击提交,所有流程就结束了。
From b0ba62e9383618f88c3684bd724f5b4e3e859079 Mon Sep 17 00:00:00 2001
From: huang28 <52352624+Huang28@users.noreply.github.com>
Date: Mon, 28 Dec 2020 22:59:44 +0800
Subject: [PATCH 035/105] Update sendNotify.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
企业微信应用消息的推送支持
---
sendNotify.js | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/sendNotify.js b/sendNotify.js
index 6a205895..eadb860b 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -48,6 +48,11 @@ let DD_BOT_SECRET = '';
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_KEY)
let QYWX_KEY = '';
+// =======================================企业微信应用消息通知设置区域===========================================
+//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001
+//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM)
+let QYWX_AM = '';
+
// =======================================iGot聚合推送通知设置区域===========================================
//此处填您iGot的信息(推送key,例如:https://push.hellyw.com/XXXXXXXX)
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入IGOT_PUSH_KEY)
@@ -108,6 +113,10 @@ if (process.env.QYWX_KEY) {
QYWX_KEY = process.env.QYWX_KEY;
}
+if (process.env.QYWX_AM) {
+ QYWX_AM = process.env.QYWX_AM;
+}
+
if (process.env.IGOT_PUSH_KEY) {
IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY
}
@@ -131,6 +140,7 @@ async function sendNotify(text, desp, params = {}) {
await tgBotNotify(text, desp);//telegram 机器人
await ddBotNotify(text, desp);//钉钉机器人
await qywxBotNotify(text, desp); //企业微信机器人
+ await qywxamNotify(text, desp); //企业微信应用消息推送
await iGotNotify(text, desp, params);//iGot
await CoolPush(text, desp);//QQ酷推
}
@@ -406,6 +416,68 @@ function qywxBotNotify(text, desp) {
});
}
+function qywxamNotify(text, desp) {
+ return new Promise(resolve => {
+ if (QYWX_AM) {
+ var QYWX_AM_AY = QYWX_AM.split(',');
+ const options_accesstoken = {
+ url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`,
+ json: {
+ corpid:`${QYWX_AM_AY[0]}`,
+ corpsecret:`${QYWX_AM_AY[1]}`,
+ },
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ };
+ $.post(options_accesstoken, (err, resp, data) => {
+ var json = JSON.parse(data);
+ accesstoken = json.access_token;
+ const options = {
+ url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`,
+ json: {
+ touser:`${QYWX_AM_AY[2]}`,
+ agentid:`${QYWX_AM_AY[3]}`,
+ msgtype: 'textcard',
+ textcard: {
+ title: `${text}`,
+ description: `${desp}`,
+ url: '127.0.0.1',
+ btntxt: '更多'
+ },
+ safe:'0',
+ },
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ };
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log('企业微信应用消息发送通知消息失败!!\n');
+ console.log(err);
+ } else {
+ data = JSON.parse(data);
+ if (data.errcode === 0) {
+ console.log('企业微信应用消息发送通知消息完成。\n');
+ } else {
+ console.log(`${data.errmsg}\n`);
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve(data);
+ }
+ });
+ });
+ } else {
+ console.log('您未提供企业微信应用消息推送所需的QYWX_AM,取消企业微信应用消息推送消息通知\n');
+ resolve();
+ }
+ });
+}
+
function iGotNotify(text, desp, params={}){
return new Promise(resolve => {
if (IGOT_PUSH_KEY) {
From 017010cdffda04a63695c6f68e771328dba7d24d Mon Sep 17 00:00:00 2001
From: sxx1314 <8444252+sxx1314@users.noreply.github.com>
Date: Thu, 31 Dec 2020 07:45:24 +0800
Subject: [PATCH 036/105] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E6=B6=88=E6=81=AF=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=9B=BE=E6=96=87?=
=?UTF-8?q?=E6=B6=88=E6=81=AF=EF=BC=88=E6=96=87=E7=AB=A0=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 改成了图文消息模式,原本的卡片信息只能显示512字节,并且看不了详情。
- 图文消息,可以设置图片和文章,并且描述也一样是512字节限制。但是可以点进去看文章详情。
- thumb_media_id 需要自己上传企业微信素材库之后才可以查询,必须设置。https://work.weixin.qq.com/api/doc/90000/90135/90253
- 文章内容暂时用的 ${desp} ,测试用marked.js转换之后也不会换行,我也懒得自己写方法希望来个大神补上。
---
sendNotify.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/sendNotify.js b/sendNotify.js
index eadb860b..262e5e97 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -49,7 +49,7 @@ let DD_BOT_SECRET = '';
let QYWX_KEY = '';
// =======================================企业微信应用消息通知设置区域===========================================
-//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001
+//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://work.weixin.qq.com/api/doc/90000/90135/90253) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM)
let QYWX_AM = '';
@@ -438,12 +438,18 @@ function qywxamNotify(text, desp) {
json: {
touser:`${QYWX_AM_AY[2]}`,
agentid:`${QYWX_AM_AY[3]}`,
- msgtype: 'textcard',
- textcard: {
+ msgtype: 'mpnews',
+ mpnews: {
+ articles: [
+ {
title: `${text}`,
- description: `${desp}`,
- url: '127.0.0.1',
- btntxt: '更多'
+ thumb_media_id: `${QYWX_AM_AY[4]}`,
+ author : `智能助手` ,
+ content_source_url: ``,
+ content : `${desp}`, //暂时直接设置成了desp
+ digest: `${desp}`
+ }
+ ]
},
safe:'0',
},
From 2d3c4223f13cfbfcae9294ca2cad8f740fbb290c Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 31 Dec 2020 10:53:46 +0800
Subject: [PATCH 037/105] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_bean_home.js | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/jd_bean_home.js b/jd_bean_home.js
index 7a84357b..ef5932ef 100644
--- a/jd_bean_home.js
+++ b/jd_bean_home.js
@@ -112,11 +112,15 @@ const JD_API_HOST = 'https://api.m.jd.com/';
async function jdBeanHome() {
$.doneState = false
- for (let i = 0; i < 3; ++i) {
+ // for (let i = 0; i < 3; ++i) {
+ // await doTask2()
+ // await $.wait(1000)
+ // if ($.doneState) break
+ // }
+ do {
await doTask2()
await $.wait(1000)
- if ($.doneState) break
- }
+ } while (!$.doneState)
await $.wait(1000)
await award("feeds")
await $.wait(1000)
@@ -142,10 +146,14 @@ function doTask2() {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- if(data.code === '0' && data.data){
+ if (data.code === '0' && data.data){
console.log(`任务完成进度:${data.data.taskProgress} / ${data.data.taskThreshold}`)
- if(data.data.taskProgress===data.data.taskThreshold)
+ if(data.data.taskProgress === data.data.taskThreshold)
$.doneState = true
+ } else if (data.code === '0' && data.errorCode === 'HT201') {
+ $.doneState = true
+ } else {
+ console.log(`做任务异常:${JSON.stringify(data)}`)
}
}
}
From 63751005445e09c475aec6efb1724e224aebb36f Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 31 Dec 2020 12:35:59 +0800
Subject: [PATCH 038/105] fix
---
jd_bean_home.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/jd_bean_home.js b/jd_bean_home.js
index ef5932ef..dc5c8858 100644
--- a/jd_bean_home.js
+++ b/jd_bean_home.js
@@ -153,6 +153,7 @@ function doTask2() {
} else if (data.code === '0' && data.errorCode === 'HT201') {
$.doneState = true
} else {
+ $.doneState = true
console.log(`做任务异常:${JSON.stringify(data)}`)
}
}
From d6b3c829cd0dba6bbcb1738eaa9e3d909ccfccc7 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 31 Dec 2020 14:43:32 +0800
Subject: [PATCH 039/105] =?UTF-8?q?=E5=A2=9E=E5=A4=A7=E5=BB=B6=E8=BF=9F?=
=?UTF-8?q?=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_bean_home.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/jd_bean_home.js b/jd_bean_home.js
index dc5c8858..666ad746 100644
--- a/jd_bean_home.js
+++ b/jd_bean_home.js
@@ -119,7 +119,7 @@ async function jdBeanHome() {
// }
do {
await doTask2()
- await $.wait(1000)
+ await $.wait(3000)
} while (!$.doneState)
await $.wait(1000)
await award("feeds")
@@ -153,6 +153,7 @@ function doTask2() {
} else if (data.code === '0' && data.errorCode === 'HT201') {
$.doneState = true
} else {
+ //HT304风控用户
$.doneState = true
console.log(`做任务异常:${JSON.stringify(data)}`)
}
From 27b82a3c576250adc2e1d8b95e2fc74ec10f99ef Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 31 Dec 2020 16:43:32 +0800
Subject: [PATCH 040/105] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=AC=E4=B8=9C?=
=?UTF-8?q?=E6=B1=BD=E8=BD=A6=E8=84=9A=E6=9C=AC=E7=9A=84=E6=89=A7=E8=A1=8C?=
=?UTF-8?q?cron?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Loon/lxk0301_LoonTask.conf | 2 +-
QuantumultX/lxk0301_gallery.json | 2 +-
Surge/lxk0301_Task.sgmodule.sgmodule | 2 +-
docker/crontab_list.sh | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index 8f236711..181904f8 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -97,7 +97,7 @@ cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到
# 京东汽车
-cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车
+cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车
# 领京豆额外奖励
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励
diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json
index 162513d2..a3709536 100644
--- a/QuantumultX/lxk0301_gallery.json
+++ b/QuantumultX/lxk0301_gallery.json
@@ -26,7 +26,7 @@
"0 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://github.com/58xinian/icon/raw/master/jd_syj.png",
"15 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
"10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png",
- "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",
+ "0 0 * * * 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",
"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",
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 08b3479b..72656fc7 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -58,7 +58,7 @@ cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
#领京豆额外奖励
cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励
#京东汽车
-cron "30 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车
+cron "0 0 * * *" 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=京东快递签到
#京东直播(活动结束时间未知)
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 046099de..dd5a341e 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -75,7 +75,7 @@
# 京东快递签到
23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1
# 京东汽车(签到满500赛点可兑换500京豆)
-33 2 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1
+0 0 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1
# 领京豆额外奖励(每日可获得3京豆)
33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1
# 京东直播(每日18豆)
From b9956b36d9460d21afd8c5df06d344551cc6c32c Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 31 Dec 2020 18:04:00 +0800
Subject: [PATCH 041/105] =?UTF-8?q?=E7=A7=8D=E8=B1=86=E5=BE=97=E8=B1=86?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B=E6=94=B6=E5=8F=96=E5=A5=BD?=
=?UTF-8?q?=E5=8F=8B=E8=90=A5=E5=85=BB=E6=B6=B2=E7=9A=84=E7=AD=96=E7=95=A5?=
=?UTF-8?q?=EF=BC=8C=E5=9C=A820=E7=82=B9=E7=9A=84=E6=97=B6=E5=80=99?=
=?UTF-8?q?=EF=BC=8C=E5=8F=AA=E9=9C=80=E6=BB=A1=E8=B6=B3=E5=A5=BD=E5=8F=8B?=
=?UTF-8?q?=E7=9A=84=E6=95=B0=E9=87=8F=E8=BE=BE=E5=88=B02=E7=93=B6?=
=?UTF-8?q?=E5=8D=B3=E5=8E=BB=E6=94=B6=E5=8F=96=EF=BC=8C=E5=85=B6=E4=BB=96?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E6=BB=A1=E8=B6=B33=E7=93=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_plantBean.js | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/jd_plantBean.js b/jd_plantBean.js
index 9497a079..8fbe3d0f 100644
--- a/jd_plantBean.js
+++ b/jd_plantBean.js
@@ -1,6 +1,6 @@
/*
种豆得豆 脚本更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js
-更新时间:2020-11-04
+更新时间:2020-12-31
已支持IOS京东双账号,云端N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
注:会自动关注任务中的店铺跟商品,介意者勿使用。
@@ -161,14 +161,27 @@ async function stealFriendWater() {
return
}
if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) {
+ let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
for (let item of $.stealFriendList.data.friendInfoList) {
- if (item.nutrCount >= 3) {
- // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
- console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
- await collectUserNutr(item.paradiseUuid);
- console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
- if ($.stealFriendRes.code === '0') {
- console.log(`偷取好友营养液成功`)
+ if (new Date(nowTimes).getHours() === 20) {
+ if (item.nutrCount >= 2) {
+ // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
+ console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
+ await collectUserNutr(item.paradiseUuid);
+ console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
+ if ($.stealFriendRes.code === '0') {
+ console.log(`偷取好友营养液成功`)
+ }
+ }
+ } else {
+ if (item.nutrCount >= 3) {
+ // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
+ console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
+ await collectUserNutr(item.paradiseUuid);
+ console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
+ if ($.stealFriendRes.code === '0') {
+ console.log(`偷取好友营养液成功`)
+ }
}
}
}
From f1b19df9d3c49f4fdf3ba092d4980516f1a70ee7 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 10:33:55 +0800
Subject: [PATCH 042/105] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E5=8E=BB?=
=?UTF-8?q?=E9=99=A4=E8=BF=87=E6=9C=9F=E7=9A=84=E6=B4=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
云函数去除过期的活动
---
serverless.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/serverless.yml b/serverless.yml
index 98a0be61..1309762e 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -46,12 +46,12 @@ inputs:
cronExpression: "0 0 0-16/8,20 * * * *"
enable: true
argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_live
- - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝 #秒杀红包雨 #健康抽奖机
+ - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝 #健康抽奖机
parameters:
- name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home_ms_redrain_health
+ name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home_health
cronExpression: "0 10 0 * * * *"
enable: true
- argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home&jd_ms_redrain&jd_health
+ argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home&jd_health
- timer: # 京东天天加速# 天天提鹅
parameters:
name: jd_speed_jd_daily_egg
@@ -64,18 +64,18 @@ inputs:
cronExpression: "0 15 * * * * *"
enable: true
argument: jd_superMarket
- - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励 #京东健康APP
+ - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励
parameters:
- name: bean_change_crazy_joy_rankingList_bean_home_jdh
+ name: bean_change_crazy_joy_rankingList_bean_home
cronExpression: "0 30 7 * * * *"
enable: true
- argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car&jd_jdh
- - timer: #金融养猪 #十元街 #京东快递 #发现-看一看 #京东赚赚 #金融打卡领年终奖
+ argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car
+ - timer: #金融养猪 #京东快递 #京东赚赚
parameters:
- name: pigPet_syj_kd_watch_jdzz_jr_sign
+ name: pigPet_kd_jdzz
cronExpression: "0 3 1 * * * *"
enable: true
- argument: jd_pigPet&jd_syj&jd_kd&jd_watch&jd_jdzz&jr_sign
+ argument: jd_pigPet&jd_kd&jd_jdzz
environment: # 环境变量
variables: # 环境变量对象
AAA: BBB # 不要删除,用来格式化对齐追加的变量的
From 0c6552165fd5799157590a69cd8ad3d5a9bd98e7 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 15:10:21 +0800
Subject: [PATCH 043/105] Update crontab_list.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
清除过期活动
---
docker/crontab_list.sh | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index dd5a341e..186c1483 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -4,18 +4,6 @@
50 23 */3 * * rm -rf /scripts/logs/*.log
##############短期活动##############
-# 秒杀红包雨(2020.12.31活动过期)
-40 8 1-31 12 * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
-# 健康抽奖机(2020.12.31活动过期)
-10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
-# 直播红包雨(2020.12.31活动过期)
-1 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
-# 京东健康APP集汪汪卡瓜分百万红包(2021.1.6活动过期)
-10 8 * * * node /scripts/jd_jdh.js >> /scripts/logs/jd_jdh.log 2>&1
-# crazyJoy自动每日任务
-10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1
##############长期活动##############
# 签到
@@ -84,7 +72,7 @@
10 11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1
# 宠汪汪邀请助力
10 10,11 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1
-# 京东发现-看一看,看40个视频领80京豆(非常耗时)
-13 11,14 * * * node /scripts/jd_watch.js >> /scripts/logs/jd_watch.log 2>&1
# 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销
44 4 * * 6 node /scripts/jd_unbind.js >> /scripts/logs/jd_unbind.log 2>&1
+# crazyJoy自动每日任务
+10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1
From 1a3f83770f6bd1c514958e57a6388391668b3768 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 15:57:39 +0800
Subject: [PATCH 044/105] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=8A=BD=E5=A5=96?=
=?UTF-8?q?=E6=9C=BA=E8=BF=98=E8=83=BD=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/crontab_list.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 186c1483..15540fe8 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -4,7 +4,8 @@
50 23 */3 * * rm -rf /scripts/logs/*.log
##############短期活动##############
-
+# 健康抽奖机(2020.12.31活动过期)
+10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
##############长期活动##############
# 签到
0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
From b46e07c519a95cf404339031b98da64bf26be575 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 16:30:51 +0800
Subject: [PATCH 045/105] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E5=B7=B2=E8=BF=87?=
=?UTF-8?q?=E6=9C=9F=E6=B4=BB=E5=8A=A8=E7=9A=84=E8=84=9A=E6=9C=AC,?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=9F=A5=E6=8F=90=E9=86=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Loon/lxk0301_LoonTask.conf | 10 +++++-----
Surge/lxk0301_Task.sgmodule.sgmodule | 8 --------
docker/crontab_list.sh | 2 +-
jd_ds.js | 11 +++++++++--
jd_ms_redrain.js | 10 ++++++++--
jd_watch.js | 18 ++++++++++++++----
jr_sign.js | 11 +++++++++--
7 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index 181904f8..63977d1f 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -91,7 +91,7 @@ http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\
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 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
+# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
# 京东快递
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到
@@ -107,18 +107,18 @@ cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
# 京东赚赚
cron "10 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚
# 京东秒杀红包雨
-cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨
+# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨
#注销京东店铺会员卡
cron "23 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡
# 京东直播
cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播
# 京东看一看
-cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看
+# cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看
#直播红包雨
-cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨
+# cron "1 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 1-31 12 *" 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=健康抽奖机
# 疯狂的joy日常任务
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 72656fc7..ac722056 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -53,8 +53,6 @@ cron "40 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, timeout=650, wake-system=1, tag=东东小窝
#十元街
cron "40 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, timeout=650, wake-system=1, tag=十元街
-#京东代属(仅京东学生认证用户可用)
-cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, timeout=650, wake-system=1, tag=京东代属
#领京豆额外奖励
cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励
#京东汽车
@@ -74,12 +72,6 @@ cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
#疯狂的joy日常任务
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务
#以下为短期活动
-#金融打卡领年终奖
-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 "1 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=秒杀红包雨
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 15540fe8..29945110 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -60,7 +60,7 @@
# 十元街
36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
# 京东代属(注:限校园用户可使用)
-36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1
+# 36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1
# 京东快递签到
23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1
# 京东汽车(签到满500赛点可兑换500京豆)
diff --git a/jd_ds.js b/jd_ds.js
index aa5bac6c..46381bf9 100644
--- a/jd_ds.js
+++ b/jd_ds.js
@@ -87,8 +87,15 @@ const JD_API_HOST = 'https://api.m.jd.com/';
})
function showMsg() {
- return new Promise(resolve => {
- $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ return new Promise(async resolve => {
+ // $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
resolve()
})
}
diff --git a/jd_ms_redrain.js b/jd_ms_redrain.js
index c0e82585..c2ea858e 100644
--- a/jd_ms_redrain.js
+++ b/jd_ms_redrain.js
@@ -83,8 +83,14 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
})
function showMsg() {
- return new Promise(resolve => {
- $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ return new Promise(async resolve => {
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
resolve()
})
}
diff --git a/jd_watch.js b/jd_watch.js
index 499a2fe2..f1f9f25a 100644
--- a/jd_watch.js
+++ b/jd_watch.js
@@ -188,6 +188,7 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
continue
}
await jdHealth()
+ await showMsg();
}
}
})()
@@ -200,8 +201,8 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
async function jdHealth() {
$.bean = 0
await getTaskList()
- console.log(`${$.name}浏览次数:${$.task.times}/${$.task.maxTimes}`)
if($.task) {
+ console.log(`${$.name}浏览次数:${$.task.times}/${$.task.maxTimes}`)
let i = 0, j = $.task.times
while(j < $.task.maxTimes) {
if (!acceptBody[i]) break
@@ -220,8 +221,15 @@ async function jdHealth() {
}
function showMsg() {
- return new Promise(resolve => {
- $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ return new Promise(async resolve => {
+ // $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
resolve()
})
}
@@ -237,7 +245,9 @@ function getTaskList() {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- $.task = data['data']['discTasks'][1]
+ if (data.busiCode === '0') {
+ $.task = data['data']['discTasks'][1]
+ }
}
}
} catch (e) {
diff --git a/jr_sign.js b/jr_sign.js
index b7e6089a..40c9a018 100644
--- a/jr_sign.js
+++ b/jr_sign.js
@@ -78,8 +78,14 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
})
function showMsg() {
- return new Promise(resolve => {
- $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ return new Promise(async resolve => {
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ }
resolve()
})
}
@@ -96,6 +102,7 @@ function sign() {
if (safeGet(data)) {
data = JSON.parse(data);
console.log(data.resultData.message)
+ message += `${data.resultData.message}`
}
}
} catch (e) {
From 20b2a4649aeb2af7cd561b79407403e78704c23e Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 16:59:35 +0800
Subject: [PATCH 046/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=81=E5=85=83?=
=?UTF-8?q?=E8=A1=97=E7=AD=BE=E5=88=B0=E5=BE=97=E4=BA=AC=E8=B1=86=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_syj.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/jd_syj.js b/jd_syj.js
index cd6dabfa..ea75fc27 100644
--- a/jd_syj.js
+++ b/jd_syj.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-11-27 09:19:21
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-11-27 09:58:02
+ * @Last Modified time: 2021-1-1 16:58:02
*/
/*
十元街脚本,一周签到下来可获得30京豆,一天任意时刻运行一次即可
@@ -93,7 +93,7 @@ function showMsg() {
let signFlag = 0;
function userSignIn() {
return new Promise(resolve => {
- const body = {"activityId":"8d6845fe2e77425c82d5078d314d33c5","inviterId":"VMIQlLQqjQyjZokQmv5bIDgq011L0Ov8","channel":"MiniProgram"};
+ const body = {"activityId":"ccd8067defcd4787871b7f0c96fcbf5c","inviterId":"","channel":"MiniProgram"};
$.get(taskUrl('userSignIn', body), async (err, resp, data) => {
try {
if (err) {
@@ -122,6 +122,10 @@ function userSignIn() {
signFlag ++;
await userSignIn();
}
+ } else if (data.code === 66) {
+ //此处有时会遇到 服务器繁忙 导致签到失败,故重复三次签到
+ $.log(`${$.name}签到失败:${data.msg}`);
+ message += `【签到】失败,${data.msg}`;
} else {
console.log(`异常:${JSON.stringify(data)}`)
}
From 9ad9c4df89a51eebb0812ad1df977d53f72e6b66 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:12:32 +0800
Subject: [PATCH 047/105] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E6=B7=BB=E5=8A=A0=E6=9C=89=E6=95=88=E7=9A=84=E5=8D=81?=
=?UTF-8?q?=E5=85=83=E8=A1=97=E6=B4=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
云函数重新添加有效的十元街活动
---
serverless.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/serverless.yml b/serverless.yml
index 1309762e..d78fe00b 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -70,12 +70,12 @@ inputs:
cronExpression: "0 30 7 * * * *"
enable: true
argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car
- - timer: #金融养猪 #京东快递 #京东赚赚
+ - timer: #金融养猪 #十元街 #京东快递 #京东赚赚
parameters:
- name: pigPet_kd_jdzz
+ name: pigPet_syj_kd_jdzz
cronExpression: "0 3 1 * * * *"
enable: true
- argument: jd_pigPet&jd_kd&jd_jdzz
+ argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz
environment: # 环境变量
variables: # 环境变量对象
AAA: BBB # 不要删除,用来格式化对齐追加的变量的
From f6233df09dd12249aad33828390e320f7e51b624 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 17:17:34 +0800
Subject: [PATCH 048/105] =?UTF-8?q?=E4=B8=9C=E4=B8=9C=E5=B7=A5=E5=8E=82=20?=
=?UTF-8?q?=20=E5=81=9A=E4=BB=BB=E5=8A=A1=E5=A2=9E=E5=8A=A0=E5=BB=B6?=
=?UTF-8?q?=E8=BF=9F=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_jdfactory.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/jd_jdfactory.js b/jd_jdfactory.js
index 5f16249c..b756da1d 100644
--- a/jd_jdfactory.js
+++ b/jd_jdfactory.js
@@ -355,7 +355,8 @@ async function doTask() {
//领取做完任务的奖励
function jdfactory_collectScore(taskToken) {
- return new Promise(resolve => {
+ return new Promise(async resolve => {
+ await $.wait(1000);
$.post(taskPostUrl("jdfactory_collectScore", { taskToken }, "jdfactory_collectScore"), async (err, resp, data) => {
try {
if (err) {
From f55a277b4a9e798f6571ef6c3ee875a82d1a9ad5 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:20:43 +0800
Subject: [PATCH 049/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=B4=BB=E5=8A=A8=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
迁移过期的活动脚本
---
jd_jdh.js => activity/jd_jdh.js | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename jd_jdh.js => activity/jd_jdh.js (100%)
diff --git a/jd_jdh.js b/activity/jd_jdh.js
similarity index 100%
rename from jd_jdh.js
rename to activity/jd_jdh.js
From 5684430c54149a227ab9818092c2c63b990debfc Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:21:33 +0800
Subject: [PATCH 050/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=B4=BB=E5=8A=A8=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
迁移过期的活动脚本
---
jd_live_redrain.js => activity/jd_live_redrain.js | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename jd_live_redrain.js => activity/jd_live_redrain.js (100%)
diff --git a/jd_live_redrain.js b/activity/jd_live_redrain.js
similarity index 100%
rename from jd_live_redrain.js
rename to activity/jd_live_redrain.js
From 12e2d1d4211e9a6036ee9ac164c904132dfae74c Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:21:58 +0800
Subject: [PATCH 051/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=B4=BB=E5=8A=A8=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
迁移过期的活动脚本
---
jd_ms_redrain.js => activity/jd_ms_redrain.js | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename jd_ms_redrain.js => activity/jd_ms_redrain.js (100%)
diff --git a/jd_ms_redrain.js b/activity/jd_ms_redrain.js
similarity index 100%
rename from jd_ms_redrain.js
rename to activity/jd_ms_redrain.js
From e0f8c2d13475f687d2bcb1ba8228166b080c610d Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:22:22 +0800
Subject: [PATCH 052/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=B4=BB=E5=8A=A8=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
迁移过期的活动脚本
---
jd_watch.js => activity/jd_watch.js | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename jd_watch.js => activity/jd_watch.js (100%)
diff --git a/jd_watch.js b/activity/jd_watch.js
similarity index 100%
rename from jd_watch.js
rename to activity/jd_watch.js
From 8fef50f9d6e7eed133bf302e1668cfd95b4f529a Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Fri, 1 Jan 2021 17:22:45 +0800
Subject: [PATCH 053/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=B4=BB=E5=8A=A8=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
迁移过期的活动脚本
---
jr_sign.js => activity/jr_sign.js | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename jr_sign.js => activity/jr_sign.js (100%)
diff --git a/jr_sign.js b/activity/jr_sign.js
similarity index 100%
rename from jr_sign.js
rename to activity/jr_sign.js
From f15392c79a22f989b0d81015552ecd1b51590ff9 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 18:10:12 +0800
Subject: [PATCH 054/105] =?UTF-8?q?jd=5Fcrazy=5Fjoy=5Fcoin.js=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E8=B4=AD=E4=B9=B0=E7=AD=89?=
=?UTF-8?q?=E7=BA=A7=E5=8A=9F=E8=83=BD=EF=BC=8C=E7=8E=AF=E5=A2=83=E5=8F=98?=
=?UTF-8?q?=E9=87=8F=E4=B8=BA=20BUY=5FJPY=5FLEVEL=EF=BC=8C=E5=A6=82?=
=?UTF-8?q?=E6=9E=9C=E8=AE=BE=E7=BD=AE=E7=9A=84=E8=B4=AD=E4=B9=B0=E7=AD=89?=
=?UTF-8?q?=E7=BA=A7=E5=A4=A7=E4=BA=8E=E6=9C=80=E9=AB=98=E5=8F=AF=E8=B4=AD?=
=?UTF-8?q?=E4=B9=B0=E7=AD=89=E7=BA=A7=EF=BC=8C=E5=88=99=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E5=A4=B1=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_crazy_joy_coin.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js
index 4e4a5a3b..8bf51c43 100644
--- a/jd_crazy_joy_coin.js
+++ b/jd_crazy_joy_coin.js
@@ -204,6 +204,10 @@ async function jdJxStory() {
await $.wait(1000)
await getJoyShop()
await $.wait(1000)
+ $.log('当前JOY分布情况')
+ $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`)
+ $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`)
+ $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`)
for (let i = 0; i < $.joyIds.length; ++i) {
if (!$.canBuy) {
$.log(`金币不足,跳过购买`)
@@ -280,8 +284,14 @@ function getJoyShop() {
data = JSON.parse(data);
if (data.success && data.data && data.data.shop) {
const shop = data.data.shop.filter(vo => vo.status === 1) || []
- $.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1
- $.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity
+ $.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1;//可购买的最大等级
+ if ($.isNode() && process.env.BUY_JPY_LEVEL) {
+ $.log(`当前可购买的最高JOY等级为${$.buyJoyLevel}级\n`)
+ $.buyJoyLevel = (process.env.BUY_JPY_LEVEL * 1) > $.buyJoyLevel ? $.buyJoyLevel : process.env.BUY_JPY_LEVEL * 1;
+ $.cost = shop[$.buyJoyLevel - 1]['coins']
+ } else {
+ $.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity
+ }
}
}
} catch (e) {
From ad95006566457ef7fcfa4ff3ea722723091c38da Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 18:11:12 +0800
Subject: [PATCH 055/105] fix
---
jd_crazy_joy_coin.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js
index 8bf51c43..669bf766 100644
--- a/jd_crazy_joy_coin.js
+++ b/jd_crazy_joy_coin.js
@@ -204,10 +204,12 @@ async function jdJxStory() {
await $.wait(1000)
await getJoyShop()
await $.wait(1000)
- $.log('当前JOY分布情况')
- $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`)
- $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`)
- $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`)
+ if ($.joyIds && $.joyIds.length > 0) {
+ $.log('当前JOY分布情况')
+ $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`)
+ $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`)
+ $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`)
+ }
for (let i = 0; i < $.joyIds.length; ++i) {
if (!$.canBuy) {
$.log(`金币不足,跳过购买`)
From 35bbf4de92426e9b4bb5aa55a8b6d7620c1c1f9b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 18:46:08 +0800
Subject: [PATCH 056/105] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AC=E5=9C=B0?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=8E=E4=BA=AC=E4=B8=9C=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E5=99=A8=E6=97=B6=E9=97=B4=E4=B9=8B=E5=B7=AE=E7=9A=84=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_joy_reward.js | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index 6878e769..d12d1c44 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -60,6 +60,7 @@ const JD_API_HOST = 'https://jdjoy.jd.com';
}
continue
}
+ console.log(`本地时间与京东服务器时间差:${await get_diff_time()}`);
await joyReward();
// $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@lxk0301`);
}
@@ -273,6 +274,35 @@ function TotalBean() {
})
})
}
+function getJDServerTime() {
+ return new Promise(resolve => {
+ // console.log(Date.now())
+ $.get({url: "https://a.jd.com//ajax/queryServerData.html",headers:{
+ "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
+ }}, async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} 获取京东服务器时间失败,请检查网路重试`)
+ } else {
+ data = JSON.parse(data);
+ $.jdTime = data['serverTime'];
+ // console.log(data['serverTime']);
+ // console.log(data['serverTime'] - Date.now())
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve($.jdTime);
+ }
+ })
+ })
+}
+async function get_diff_time() {
+ // console.log(await getJDServerTime())
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ return nowTime - await getJDServerTime();
+}
function jsonParse(str) {
if (typeof str == "string") {
try {
From 93a9500730c7966379a2f0ac2198c4dba3dab5aa Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 19:00:58 +0800
Subject: [PATCH 057/105] Update jd_joy_reward.js
---
jd_joy_reward.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index d12d1c44..26bf0c0f 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -60,7 +60,7 @@ const JD_API_HOST = 'https://jdjoy.jd.com';
}
continue
}
- console.log(`本地时间与京东服务器时间差:${await get_diff_time()}`);
+ console.log(`本地时间与京东服务器时间差(毫秒):${await get_diff_time()}`);
await joyReward();
// $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@lxk0301`);
}
From 98e8db76ec43e22e4faabdcc9d92e266d49e7e26 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 1 Jan 2021 22:14:14 +0800
Subject: [PATCH 058/105] Update jd_dreamFactory.js
---
jd_dreamFactory.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index 2333f2f8..11687c97 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -34,7 +34,7 @@ const randomCount = $.isNode() ? 20 : 5;
let tuanActiveId = `6S9y4sJUfA2vPQP6TLdVIQ==`;
const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`;
let cookiesArr = [], cookie = '', message = '';
-const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg=='];
+const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@0WtCMPNq7jekehT6d3AbFw==', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg=='];
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
From 674ea69ac0428c0f3e8fbcd0a58d967b9eacc303 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 2 Jan 2021 10:41:57 +0800
Subject: [PATCH 059/105] Update lxk0301_Task.sgmodule.sgmodule
---
Surge/lxk0301_Task.sgmodule.sgmodule | 2 --
1 file changed, 2 deletions(-)
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index ac722056..0419fcbe 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -61,8 +61,6 @@ cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
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 "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, timeout=7750, wake-system=1, tag=京东看一看
#京东健康
cron "20 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, timeout=750, wake-system=1, tag=京东健康
#京东赚赚
From da6de9b84d4da2ba93cfc47d7965bce71a40fcb5 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 2 Jan 2021 10:46:09 +0800
Subject: [PATCH 060/105] Update lxk0301_Task.sgmodule.sgmodule
---
Surge/lxk0301_Task.sgmodule.sgmodule | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 0419fcbe..f359b012 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -71,5 +71,5 @@ cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务
#以下为短期活动
#健康抽奖机
-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=健康抽奖机
+cron "30 2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, timeout=750, wake-system=1, tag=健康抽奖机
From 49facf0bd9a57da82673ef8102d1622c922c84a6 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Sat, 2 Jan 2021 21:42:52 +0800
Subject: [PATCH 061/105] add
---
backUp/iOS_Weather_AQI_Standard.js | 138 +++++++++++++++++++++++++++++
1 file changed, 138 insertions(+)
create mode 100644 backUp/iOS_Weather_AQI_Standard.js
diff --git a/backUp/iOS_Weather_AQI_Standard.js b/backUp/iOS_Weather_AQI_Standard.js
new file mode 100644
index 00000000..dfb22941
--- /dev/null
+++ b/backUp/iOS_Weather_AQI_Standard.js
@@ -0,0 +1,138 @@
+// Developed by Hackl0us (https://github.com/hackl0us)
+
+// STEP 1: 前往 https://aqicn.org/data-platform/token/ 注册账户,将申请的 API Token 填入下方
+let aqicnToken = ''
+// STEP 2: 参考下方配置片段,在代理工具的配置文件中添加对应的配置。注意:script-path 后应该替换为添加 apicnToken 值后的脚本路径
+/*
+===============Surge=================
+[Script]
+AQI-US = type=http-response, pattern=https://weather-data.apple.com/v1/weather/[\w-]+/[0-9]+\.[0-9]+/[0-9]+\.[0-9]+\?, requires-body=true, script-path=/path/to/iOS_Weather_AQI_Standard.js
+
+[MITM]
+hostname = weather-data.apple.com
+*/
+const $ = new Env('牛逼天气');
+aqicnToken = $.getdata('hackl0us_aqi_token');
+
+const AirQualityStandard = {
+ CN: 'HJ6332012.1',
+ US: 'EPA_NowCast.1'
+}
+
+const AirQualityLevel = {
+ GOOD: 1,
+ MODERATE: 2,
+ UNHEALTHY_FOR_SENSITIVE: 3,
+ UNHEALTHY: 4,
+ VERY_UNHEALTHY: 5,
+ HAZARDOUS: 6
+}
+
+const coordRegex = /https:\/\/weather-data\.apple\.com\/v1\/weather\/[\w-]+\/([0-9]+\.[0-9]+)\/([0-9]+\.[0-9]+)\?/
+const [_, lat, lng] = $request.url.match(coordRegex)
+
+function classifyAirQualityLevel(aqiIndex) {
+ if (aqiIndex >= 0 && aqiIndex <= 50) {
+ return AirQualityLevel.GOOD;
+ } else if (aqiIndex >= 51 && aqiIndex <= 100) {
+ return AirQualityLevel.MODERATE;
+ } else if (aqiIndex >= 101 && aqiIndex <= 150) {
+ return AirQualityLevel.UNHEALTHY_FOR_SENSITIVE;
+ } else if (aqiIndex >= 151 && aqiIndex <= 200) {
+ return AirQualityLevel.UNHEALTHY;
+ } else if (aqiIndex >= 201 && aqiIndex <= 300) {
+ return AirQualityLevel.VERY_UNHEALTHY;
+ } else if (aqiIndex >= 301 && aqiIndex <= 500) {
+ return AirQualityLevel.HAZARDOUS;
+ }
+}
+
+function modifyWeatherResp(weatherRespBody, aqicnRespBody) {
+ let weatherRespJson = JSON.parse(weatherRespBody)
+ let aqicnRespJson = JSON.parse(aqicnRespBody).data
+ weatherRespJson.air_quality = constructAirQuailityNode(aqicnRespJson)
+ return JSON.stringify(weatherRespJson)
+}
+
+function getPrimaryPollutant(pollutant) {
+ switch (pollutant) {
+ case 'co':
+ return 'CO2';
+ case 'so2':
+ return 'SO2';
+ case 'no2':
+ return 'NO2';
+ case 'pm25':
+ return 'PM2.5';
+ case 'pm10':
+ return 'PM10';
+ case 'o3':
+ return 'OZONE';
+ default:
+ console.log('Unknown pollutant ' + pollutant);
+ }
+}
+
+function constructAirQuailityNode(aqicnData) {
+ let airQualityNode = { "source": "", "learnMoreURL": "", "isSignificant": true, "airQualityCategoryIndex": 1, "airQualityScale": "", "airQualityIndex": 0, "pollutants": { "CO": { "name": "CO", "amount": 0, "unit": "μg/m3" }, "SO2": { "name": "SO2", "amount": 0, "unit": "μg/m3" }, "NO2": { "name": "NO2", "amount": 0, "unit": "μg/m3" }, "PM2.5": { "name": "PM2.5", "amount": 0, "unit": "μg/m3" }, "OZONE": { "name": "OZONE", "amount": 0, "unit": "μg/m3" }, "PM10": { "name": "PM10", "amount": 0, "unit": "μg/m3" } }, "metadata": { "reported_time": 0, "longitude": 0, "provider_name": "aqicn.org", "expire_time": 2, "provider_logo": "https://i.loli.net/2020/12/27/UqW23eZLFAIbxGV.png", "read_time": 2, "latitude": 0, "v": 1, "language": "", "data_source": 0 }, "name": "AirQuality", "primaryPollutant": "" }
+ const aqicnIndex = aqicnData.aqi
+ airQualityNode.source = aqicnData.city.name
+ airQualityNode.learnMoreURL = aqicnData.city.url + '/cn/m'
+ airQualityNode.airQualityCategoryIndex = classifyAirQualityLevel(aqicnIndex)
+ airQualityNode.airQualityScale = AirQualityStandard.US
+ airQualityNode.airQualityIndex = aqicnIndex
+ airQualityNode.pollutants.CO.amount = aqicnData.iaqi.co?.v || -1
+ airQualityNode.pollutants.SO2.amount = aqicnData.iaqi.so2?.v || -1
+ airQualityNode.pollutants.NO2.amount = aqicnData.iaqi.no2?.v || -1
+ airQualityNode.pollutants["PM2.5"].amount = aqicnData.iaqi.pm25?.v || -1
+ airQualityNode.pollutants.OZONE.amount = aqicnData.iaqi.o3?.v || -1
+ airQualityNode.pollutants.PM10.amount = aqicnData.iaqi.pm10?.v || -1
+ airQualityNode.metadata.latitude = aqicnData.city.geo[0]
+ airQualityNode.metadata.longitude = aqicnData.city.geo[1]
+ airQualityNode.metadata.read_time = roundHours(new Date(), 'down')
+ airQualityNode.metadata.expire_time = roundHours(new Date(), 'up')
+ airQualityNode.metadata.reported_time = aqicnData.time.v
+ //airQualityNode.metadata.language = $request.headers['Accept-Language']
+ airQualityNode.primaryPollutant = getPrimaryPollutant(aqicnData.dominentpol)
+ return airQualityNode
+}
+
+function roundHours(time, method) {
+ switch (method) {
+ case 'up':
+ time.setHours(time.getHours() + Math.ceil(time.getMinutes() / 60));
+ break;
+ case 'down':
+ time.setHours(time.getHours() + Math.floor(time.getMinutes() / 60));
+ break;
+ default:
+ console.log("Error rounding method");
+ }
+ time.setMinutes(2, 0, 0);
+ return time;
+}
+
+// $httpClient.get(`https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, function (error, _response, data) {
+// if (error) {
+// let body = $response.body
+// $done({ body })
+// } else {
+// let body = modifyWeatherResp($response.body, data)
+// $done({ body })
+// }
+// });
+$.get({ url: `https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, headers: $request.headers },(err, resp, data) => {
+ try {
+ if (err) {
+ $.logErr(err, resp);
+ } else {
+ console.log(`${JSON.stringify(resp.body)}`);
+ let body = modifyWeatherResp($response.body, resp.body);
+ $.done({body});
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ $.done();
+ }
+});
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
\ No newline at end of file
From fabfbe5b5de44f87f4f5b1a0db806edd8ad66756 Mon Sep 17 00:00:00 2001
From: Akira
Date: Sat, 2 Jan 2021 23:27:27 +0800
Subject: [PATCH 062/105] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89shell=E8=84=9A=E6=9C=AC=E8=87=AA=E5=8A=A8mod?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/Readme.md | 26 ++++++++++++++++++++------
docker/default_task.sh | 23 ++++++++++++++++++++++-
2 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/docker/Readme.md b/docker/Readme.md
index beb03302..922a84a7 100644
--- a/docker/Readme.md
+++ b/docker/Readme.md
@@ -1,4 +1,24 @@
### Usage
+```diff
++ 2021-01-03更新 增加 CUSTOM_SHELL_FILE 参数配置执行自定义shell脚本
++ 例1:配置远程shell脚本, 我自己写了一个shell脚本https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh 内容很简单下载惊喜农场并添加定时任务
++ CUSTOM_SHELL_FILE=https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh
++
++ 例2:配置docker挂载本地自定义shell脚本,/scripts/docker/shell_script_mod.sh 为你在docker-compose.yml里面挂载到容器里面绝对路径
++ CUSTOM_SHELL_FILE=/scripts/docker/shell_script_mod.sh
++
++ tip:如果使用远程自定义,请保证网络畅通或者选择合适的国内仓库,例如有部分人的容器里面就下载不到github的raw文件,那就可以把自己的自定义shell写在gitee上,或者换本地挂载
++ 如果是 docker 挂载本地,请保重文件挂载进去了,并且配置的是绝对路径。
++ 自定义 shell 脚本里面如果要加 crontab 任务请使用 echo 追加到 /scripts/docker/merged_list_file.sh 里面否者不生效
++ 注⚠️ 建议无shell能力的不要轻易使用,当然你可以找别人写好适配了这个docker镜像的脚本直接远程配置
++ 上面写了这么多如果还看不懂,不建议使用该变量功能。
+_____
+! ⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用
+! 更新后`command:`指令配置不再需要
+! 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择
+! - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字
+! 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新
+```
> 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式
- `docker-compose` 安装(群晖nas docker自带安装了docker-compose)
@@ -21,12 +41,6 @@ pip install docker-compose
### 如果需要使用 docker 多个账户独立并发执行定时任务,[参考这里](https://github.com/iouAkira/scripts/blob/patch-1/docker/docker%E5%A4%9A%E8%B4%A6%E6%88%B7%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E5%AE%B9%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md#%E4%BD%BF%E7%94%A8%E6%AD%A4%E6%96%B9%E5%BC%8F%E8%AF%B7%E5%85%88%E7%90%86%E8%A7%A3%E5%AD%A6%E4%BC%9A%E4%BD%BF%E7%94%A8docker%E5%8A%9E%E6%B3%95%E4%B8%80%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F)
-⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用
-- 更新后`command:`指令配置不再需要
-- 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择
-- - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字
-- 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新
-
> 注⚠️:前提先理解学会使用这下面的教程
### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可
需要新建的目录文件结构参考如下:
diff --git a/docker/default_task.sh b/docker/default_task.sh
index caf4f6d1..26da7f0f 100644
--- a/docker/default_task.sh
+++ b/docker/default_task.sh
@@ -107,7 +107,7 @@ if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then
echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile
fi
-if [ $RANDOM_DELAY_MAX ];then
+if [ $RANDOM_DELAY_MAX ]; then
if [ $RANDOM_DELAY_MAX -ge 1 ]; then
echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... "
sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile
@@ -116,6 +116,27 @@ else
echo "未配置随即延迟对应的环境变量,故不设置延迟任务"
fi
+##增加自定义shell脚本
+if [ 0"$CUSTOM_SHELL_FILE" = "0" ]; then
+ echo "未配置自定shell脚本文件,跳过执行。"
+else
+ if expr "$CUSTOM_SHELL_FILE" : 'http.*' &>/dev/null; then
+ echo "自定义shell脚本为远程脚本,开始下在自定义远程脚本。"
+ wget -O /scripts/docker/shell_script_mod.sh $CUSTOM_SHELL_FILE
+ echo "下载完成,开始执行..."
+ sh -x /scripts/docker/shell_script_mod.sh
+ echo "自定义远程shell脚本下载并执行结束。"
+ else
+ if [ !$CUSTOM_SHELL_FILE ]; then
+ echo "自定义shell脚本为docker挂载脚本文件,但是指定挂载文件不存在,跳过执行。"
+ else
+ echo "docker挂载的自定shell脚本,开始执行..."
+ sh -x $CUSTOM_SHELL_FILE
+ echo "docker挂载的自定shell脚本,执行结束。"
+ fi
+ fi
+fi
+
echo "加载最新的定时任务文件..."
crontab $mergedListFile
From a8eb927541d9428c0e0635aff03bcf322778d436 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 12:22:11 +0800
Subject: [PATCH 063/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=9C=E4=B8=9C?=
=?UTF-8?q?=E5=B0=8F=E7=AA=9D=E5=9B=A0=E8=A3=85=E9=A5=B0=E9=A2=86=E4=BA=AC?=
=?UTF-8?q?=E8=B1=86=E5=8A=9F=E8=83=BD=E4=B8=8B=E7=BA=BF=E5=AF=BC=E8=87=B4?=
=?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=87=BA=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Loon/lxk0301_LoonTask.conf | 2 +-
docker/crontab_list.sh | 2 +-
jd_small_home.js | 40 ++++++++++++++++++++------------------
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index 63977d1f..13ff0c41 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -120,6 +120,6 @@ cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd
# 金融打卡领年终奖
# 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=健康抽奖机
+cron "10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
# 疯狂的joy日常任务
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 29945110..4dbf59b8 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -5,7 +5,7 @@
##############短期活动##############
# 健康抽奖机(2020.12.31活动过期)
-10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
+10 0 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
##############长期活动##############
# 签到
0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
diff --git a/jd_small_home.js b/jd_small_home.js
index 096519e6..46a21a0b 100644
--- a/jd_small_home.js
+++ b/jd_small_home.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-11-12 11:42:12
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-12-23 14:27:20
+ * @Last Modified time: 2021-1-4 14:27:20
*/
/*
东东小窝 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js
@@ -274,25 +274,27 @@ function queryFurnituresCenterList() {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.head.code === 200) {
- let { buy, list } = data.body;
- $.canBuyList = [];
- list.map((item, index) => {
- if (buy.some((buyItem) => buyItem === item.id)) return
- $.canBuyList.push(item);
- })
- $.canBuyList.sort(sortByjdBeanNum);
- if ($.canBuyList[0].needWoB <= $.woB) {
- await furnituresCenterPurchase($.canBuyList[0].id, $.canBuyList[0].jdBeanNum);
- } else {
- console.log(`\n兑换${$.canBuyList[0].jdBeanNum}京豆失败:当前wo币${$.woB}不够兑换所需的${$.canBuyList[0].needWoB}WO币`)
- message += `【装饰领京豆】兑换${$.canBuyList[0].jdBeanNum}京豆失败,原因:WO币不够\n`;
+ if (data.body) {
+ let { buy, list } = data.body;
+ $.canBuyList = [];
+ list.map((item, index) => {
+ if (buy.some((buyItem) => buyItem === item.id)) return
+ $.canBuyList.push(item);
+ })
+ $.canBuyList.sort(sortByjdBeanNum);
+ if ($.canBuyList[0].needWoB <= $.woB) {
+ await furnituresCenterPurchase($.canBuyList[0].id, $.canBuyList[0].jdBeanNum);
+ } else {
+ console.log(`\n兑换${$.canBuyList[0].jdBeanNum}京豆失败:当前wo币${$.woB}不够兑换所需的${$.canBuyList[0].needWoB}WO币`)
+ message += `【装饰领京豆】兑换${$.canBuyList[0].jdBeanNum}京豆失败,原因:WO币不够\n`;
+ }
+ // for (let canBuyItem of $.canBuyList) {
+ // if (canBuyItem.needWoB <= $.woB) {
+ // await furnituresCenterPurchase(canBuyItem.id, canBuyItem.jdBeanNum);
+ // break
+ // }
+ // }
}
- // for (let canBuyItem of $.canBuyList) {
- // if (canBuyItem.needWoB <= $.woB) {
- // await furnituresCenterPurchase(canBuyItem.id, canBuyItem.jdBeanNum);
- // break
- // }
- // }
}
}
}
From 8b160136e9e57b4f3b26ae73926e7445b80a0b65 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 12:35:46 +0800
Subject: [PATCH 064/105] =?UTF-8?q?=E4=B8=9C=E4=B8=9C=E5=B7=A5=E5=8E=82?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD=EF=BC=8C=E5=87=8F=E5=B0=91?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E7=94=A8=E6=88=B7=E8=8E=B7=E5=8F=96=E7=9A=84?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=85=A8=E5=AF=BC=E8=87=B4=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC=E5=87=BA=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
activity/jd_apple_live.js | 2 +-
activity/jd_jxstory.js | 2 +-
activity/jd_pubg.js | 2 +-
jd_crazy_joy.js | 2 +-
jd_dreamFactory.js | 2 +-
jd_fruit.js | 2 +-
jd_health.js | 2 +-
jd_jdfactory.js | 40 +++++++++++++++++++++------------------
jd_jdzz.js | 2 +-
jd_pet.js | 2 +-
jd_plantBean.js | 2 +-
11 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/activity/jd_apple_live.js b/activity/jd_apple_live.js
index 26022817..e2d04104 100644
--- a/activity/jd_apple_live.js
+++ b/activity/jd_apple_live.js
@@ -283,7 +283,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/activity/jd_jxstory.js b/activity/jd_jxstory.js
index cd46e3ed..45c79941 100644
--- a/activity/jd_jxstory.js
+++ b/activity/jd_jxstory.js
@@ -498,7 +498,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/activity/jd_pubg.js b/activity/jd_pubg.js
index bed15df4..cc22b60c 100644
--- a/activity/jd_pubg.js
+++ b/activity/jd_pubg.js
@@ -330,7 +330,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js
index a87e8711..f1d1f5d9 100644
--- a/jd_crazy_joy.js
+++ b/jd_crazy_joy.js
@@ -666,7 +666,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index 11687c97..713a46f9 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -1305,7 +1305,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_fruit.js b/jd_fruit.js
index 03185eb1..2cb8ec94 100644
--- a/jd_fruit.js
+++ b/jd_fruit.js
@@ -1239,7 +1239,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_health.js b/jd_health.js
index ee4ffe9b..b05005d0 100644
--- a/jd_health.js
+++ b/jd_health.js
@@ -265,7 +265,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_jdfactory.js b/jd_jdfactory.js
index b756da1d..546b7109 100644
--- a/jd_jdfactory.js
+++ b/jd_jdfactory.js
@@ -108,8 +108,8 @@ function showMsg() {
} else {
$.log(`京东账号${$.index}${$.nickName}\n${message}`);
}
- if (new Date().getHours() === 23) {
- $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
+ if (new Date().getHours() === 12) {
+ $.msg($.name, '', `${message}`);
}
resolve()
})
@@ -181,6 +181,7 @@ async function algorithm() {
}
} else {
console.log(`\n此账号${$.index}${$.nickName}暂未选择商品\n`);
+ message += `京东账号${$.index} ${$.nickName}\n`;
message += `已选商品:暂无\n`;
message += `心仪商品:${wantProduct ? wantProduct : '暂无'}\n`;
if (wantProduct) {
@@ -216,17 +217,17 @@ async function algorithm() {
} else {
console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`);
await jdfactory_getProductList(true);
- message += `当前剩余最多商品:${$.canMakeList[0].name}\n`;
- message += `兑换所需电量:${$.canMakeList[0].fullScore}\n`;
+ message += `当前剩余最多商品:${$.canMakeList[0] && $.canMakeList[0].name}\n`;
+ message += `兑换所需电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n`;
message += `您当前总电量:${$.batteryValue * 1}\n`;
- if ($.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0].fullScore) {
+ if ($.canMakeList[0] && $.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0] && $.canMakeList[0].fullScore) {
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
if (new Date(nowTimes).getHours() === 12) {
- $.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'});
- if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
+ $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0] && [0].name}所需总电量:${$.canMakeList[0] && $.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'});
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
}
} else {
- console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
+ console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0] && $.canMakeList[0].name}所需的 ${$.canMakeList[0] && $.canMakeList[0].fullScore}电量\n`)
}
}
}
@@ -535,17 +536,20 @@ function jdfactory_getProductList(flag = false) {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.data.bizCode === 0) {
+ $.canMakeList = [];
$.canMakeList = data.data.result.canMakeList;//当前可选商品列表 sellOut:1为已抢光,0为目前可选择
- $.canMakeList.sort(sortCouponCount);
- console.log(`商品名称 可选状态 剩余量`)
- for (let item of $.canMakeList) {
- console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`);
- }
- if (!flag) {
+ if ($.canMakeList && $.canMakeList.length > 0) {
+ $.canMakeList.sort(sortCouponCount);
+ console.log(`商品名称 可选状态 剩余量`)
for (let item of $.canMakeList) {
- if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) {
- await jdfactory_makeProduct(item.skuId);
- break
+ console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`);
+ }
+ if (!flag) {
+ for (let item of $.canMakeList) {
+ if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) {
+ await jdfactory_makeProduct(item.skuId);
+ break
+ }
}
}
}
@@ -624,7 +628,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_jdzz.js b/jd_jdzz.js
index f5da3632..5ea61aa2 100644
--- a/jd_jdzz.js
+++ b/jd_jdzz.js
@@ -343,7 +343,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_pet.js b/jd_pet.js
index 9b19c20f..cde3fd7f 100644
--- a/jd_pet.js
+++ b/jd_pet.js
@@ -442,7 +442,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_plantBean.js b/jd_plantBean.js
index 8fbe3d0f..c573903e 100644
--- a/jd_plantBean.js
+++ b/jd_plantBean.js
@@ -521,7 +521,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
From a36a3233eab6a243a3a354524e7b58139eaec80c Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 13:03:49 +0800
Subject: [PATCH 065/105] update
---
jd_bean_sign.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index accf5990..c54178c5 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -1,7 +1,7 @@
/*
京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
Node.JS专用
-更新时间:2020-12-21
+更新时间:2021-1-4
从 github @ruicky改写而来
version v0.0.1
create by ruicky
@@ -17,6 +17,7 @@ const download = require('download');
let resultPath = "./result.txt";
let JD_DailyBonusPath = "./JD_DailyBonus.js";
let outPutUrl = './';
+let NodeSet = 'CookieSet.json';
let cookiesArr = [], cookie = '';
if ($.isNode()) {
@@ -130,6 +131,7 @@ async function downFile () {
async function changeFile (content) {
console.log(`开始替换变量`)
let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`);
+ newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = ${NodeSet}`)
if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') {
newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`);
}
@@ -219,6 +221,7 @@ function requireConfig() {
resultPath = err ? '/tmp/result.txt' : resultPath;
JD_DailyBonusPath = err ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath;
outPutUrl = err ? '/tmp/' : outPutUrl;
+ NodeSet = err ? '/tmp/CookieSet.json' : NodeSet;
resolve()
});
})
From 70bd43eaee7cbd409e6f6a7820b042e7e3029c9a Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 13:08:29 +0800
Subject: [PATCH 066/105] fix
---
jd_bean_sign.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index c54178c5..fb3fee0e 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -131,7 +131,7 @@ async function downFile () {
async function changeFile (content) {
console.log(`开始替换变量`)
let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`);
- newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = ${NodeSet}`)
+ newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') {
newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`);
}
From 27117a0b1743634d431747051442049a8b2896fb Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 13:47:35 +0800
Subject: [PATCH 067/105] debug
---
jd_joy_reward.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index 26bf0c0f..560be572 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -299,7 +299,9 @@ function getJDServerTime() {
})
}
async function get_diff_time() {
- // console.log(await getJDServerTime())
+ console.log(`本机时间戳 ${Date.now()}`)
+ console.log(`京东服务器时间戳 ${await getJDServerTime()}`)
+ console.log(Date.now() - await getJDServerTime())
let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
return nowTime - await getJDServerTime();
}
From 32fab79c15bd9bd96bfea4a55c656708a0fbb885 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 13:51:16 +0800
Subject: [PATCH 068/105] debug
---
jd_joy_reward.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index 560be572..2eaf482d 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -299,11 +299,9 @@ function getJDServerTime() {
})
}
async function get_diff_time() {
- console.log(`本机时间戳 ${Date.now()}`)
- console.log(`京东服务器时间戳 ${await getJDServerTime()}`)
- console.log(Date.now() - await getJDServerTime())
- let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
- return nowTime - await getJDServerTime();
+ // console.log(`本机时间戳 ${Date.now()}`)
+ // console.log(`京东服务器时间戳 ${await getJDServerTime()}`)
+ return Date.now() - await getJDServerTime();
}
function jsonParse(str) {
if (typeof str == "string") {
From f64f7abe3537be20deeef194a81001c7c111a004 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 17:14:58 +0800
Subject: [PATCH 069/105] update
---
jdCookie.js | 5 -----
1 file changed, 5 deletions(-)
diff --git a/jdCookie.js b/jdCookie.js
index 4eb2bb76..8f30c693 100644
--- a/jdCookie.js
+++ b/jdCookie.js
@@ -15,17 +15,12 @@ if (process.env.JD_COOKIE) {
} else if (process.env.JD_COOKIE.indexOf('\n') > -1) {
console.log(`您的cookie选择的是用换行隔开\n`)
CookieJDs = process.env.JD_COOKIE.split('\n');
- } else if (process.env.JD_COOKIE.indexOf('\\n') > -1) {
- //环境变量兼容腾讯云和docker下\n会被转义成\\n
- console.log(`您的cookie选择的是用换行隔开\\n`)
- CookieJDs = process.env.JD_COOKIE.split('\\n');
} else {
CookieJDs = [process.env.JD_COOKIE];
}
CookieJDs = [...new Set(CookieJDs)]
console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`);
console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
- // console.log(`\n==================脚本执行来自 github action=====================\n`)
}
for (let i = 0; i < CookieJDs.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
From 8296ce5415e9a484b4725a839ed07d264ece6650 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Mon, 4 Jan 2021 17:22:19 +0800
Subject: [PATCH 070/105] update jdCookie.js
---
jdCookie.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/jdCookie.js b/jdCookie.js
index 8f30c693..f24b3983 100644
--- a/jdCookie.js
+++ b/jdCookie.js
@@ -18,10 +18,10 @@ if (process.env.JD_COOKIE) {
} else {
CookieJDs = [process.env.JD_COOKIE];
}
- CookieJDs = [...new Set(CookieJDs)]
- console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`);
- console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
}
+CookieJDs = [...new Set(CookieJDs.filter(item => item !== "" && item !== null && item !== undefined))]
+console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`);
+console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
for (let i = 0; i < CookieJDs.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
exports['CookieJD' + index] = CookieJDs[i];
From 4d3857514da55b67c358e199b6aa6773d47283c4 Mon Sep 17 00:00:00 2001
From: sxx1314 <8444252+sxx1314@users.noreply.github.com>
Date: Tue, 5 Jan 2021 00:53:50 +0800
Subject: [PATCH 071/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=81=E4=B8=9A?=
=?UTF-8?q?=E5=BE=AE=E4=BF=A1=20=E5=BA=94=E7=94=A8=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E6=96=87=E7=AB=A0=E4=B8=AD=E7=9A=84=E6=8D=A2=E8=A1=8C=E7=BC=BA?=
=?UTF-8?q?=E5=A4=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复企业微信 应用消息图文消息推送中换行缺失的问题
- 简单的替换了换行符,以后可以按照需求增加css等样式。
- 更换了图片id的issues说明链接
---
sendNotify.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sendNotify.js b/sendNotify.js
index 262e5e97..e32a197b 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -49,7 +49,7 @@ let DD_BOT_SECRET = '';
let QYWX_KEY = '';
// =======================================企业微信应用消息通知设置区域===========================================
-//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://work.weixin.qq.com/api/doc/90000/90135/90253) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat
+//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://github.com/lxk0301/jd_scripts/issues/519) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM)
let QYWX_AM = '';
@@ -430,7 +430,8 @@ function qywxamNotify(text, desp) {
'Content-Type': 'application/json',
},
};
- $.post(options_accesstoken, (err, resp, data) => {
+ $.post(options_accesstoken, (err, resp, data) => {
+ html=desp.replace(/\n/g,"
")
var json = JSON.parse(data);
accesstoken = json.access_token;
const options = {
@@ -446,7 +447,7 @@ function qywxamNotify(text, desp) {
thumb_media_id: `${QYWX_AM_AY[4]}`,
author : `智能助手` ,
content_source_url: ``,
- content : `${desp}`, //暂时直接设置成了desp
+ content : `${html}`,
digest: `${desp}`
}
]
From 003c857fd18c45766bc544fe84f4d2a5f227ff29 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 09:20:26 +0800
Subject: [PATCH 072/105] update jdCookie.js
---
jdCookie.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jdCookie.js b/jdCookie.js
index f24b3983..0dcadb23 100644
--- a/jdCookie.js
+++ b/jdCookie.js
@@ -24,5 +24,5 @@ console.log(`\n====================共有${CookieJDs.length}个京东账号Cooki
console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
for (let i = 0; i < CookieJDs.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
- exports['CookieJD' + index] = CookieJDs[i];
+ exports['CookieJD' + index] = CookieJDs[i].trim();
}
From 17a35e08fe2294f19a6a03d36936a0f4b1b579ed Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 09:39:24 +0800
Subject: [PATCH 073/105] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E8=BF=87=E6=9C=9F?=
=?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=8C=E8=BF=81=E7=A7=BBtencentscf.md?=
=?UTF-8?q?=E5=88=B0=E5=88=AB=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=B9=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 +-
jd_ds.js => activity/jd_ds.js | 0
backUp/tencentscf.md | 128 ++++++++++++++++++++++++++++++++++
jd_fruit.js | 40 ++++++-----
4 files changed, 152 insertions(+), 20 deletions(-)
rename jd_ds.js => activity/jd_ds.js (100%)
create mode 100644 backUp/tencentscf.md
diff --git a/README.md b/README.md
index 8783d737..005764d5 100644
--- a/README.md
+++ b/README.md
@@ -85,9 +85,9 @@
### 方法二:云服务器、腾讯云函数等等
- 需自行有云服务器,云函数等
- - 腾讯云云函数 [快速部署教程](tencentscf.md)(免费)
+ - 腾讯云云函数 [快速部署教程](../tencentscf.md)(免费)
- 腾讯云云函数控制台使用 [教程说明](iCloud.md)
- - 腾讯云云函数 [GitHub Action部署教程](tencentscf.md#github-action-部署)
+ - 腾讯云云函数 [GitHub Action部署教程](../tencentscf.md#github-action-部署)
### 方法三:Docker(NAS或VPS用户)
diff --git a/jd_ds.js b/activity/jd_ds.js
similarity index 100%
rename from jd_ds.js
rename to activity/jd_ds.js
diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md
new file mode 100644
index 00000000..30c04ca2
--- /dev/null
+++ b/backUp/tencentscf.md
@@ -0,0 +1,128 @@
+
+# 云函数快速部署京东脚本
+>
+> - 本地安装依赖使用serverless部署,[点这里](tencentscf.md#1-安装-nodejs-环境)
+> - Github Action 部署[点这里](tencentscf.md#github-action-部署)
+
+## 1. 安装 Node.js 环境
+
+Node.js 环境 [下载地址](https://nodejs.org/zh-tw/download/) ,根据自己的操作系统下载和安装。
+
+## 2. 下载代码
+
+点击红框处下载压缩包
+
+
+## 3. 安装依赖,配置 cookie
+
+### 3.1 安装依赖
+
+压缩包解压后进入项目文件夹
+
+- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口**
+- Mac 用户通过终端,自行进入该文件夹
+
+在命令行内输入 `npm i `,等待运行完成。
+
+此时,项目文件夹内会多出一个 `node_modules`文件夹
+
+### 3.2 配置 cookie
+
+打开项目文件内的 `jdCookie.js`
+
+在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔
+
+例如
+
+```javascript
+let CookieJDs = [
+ 'pt_key=xxx;pt_pin=xxx;',
+ 'pt_key=zzz;pt_pin=zzz;',
+ 'pt_key=aaa;pt_pin=xxxaaa'
+]
+```
+
+> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md)
+
+
+## 4. 部署到云函数
+
+### 4.1 开通服务
+
+依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
+
+> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
+
+### 4.2 工具部署
+
+下载 Serverless 工具,快速部署函数
+```
+npm install -g serverless
+```
+
+执行部署命令
+```
+serverless deploy
+```
+
+如果已经配置了永久秘钥,则可以直接部署,如果没有,可以直接**微信扫码**登录腾讯云,并且授权部署。
+
+过几秒后,查看输出,可以看到函数和定时触发器都已经配置完成。
+```
+serverless ⚡framework
+Action: "deploy" - Stage: "dev" - App: "jdscript" - Instance: "jdscript"
+
+functionName: scf-jdscript
+description: This is a function in jdscript application.
+namespace: default
+runtime: Nodejs12.16
+handler: index.main_handler
+memorySize: 64
+lastVersion: $LATEST
+traffic: 1
+triggers:
+ timer:
+ - timer-jdscript-dev
+
+36s › jdscript › Success
+```
+
+## 5. 查看和测试
+
+登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
+
+在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
+
+
+
+> 如果需要配置永久秘钥,则可以在[访问秘钥页面](https://console.cloud.tencent.com/cam/capi)获取账号的 TENCENT_SECRET_ID,TENCENT_SECRET_KEY,并配置在代码根目录 .env 文件中。
+
+
+# Github Action 部署
+## 1. 开通服务
+
+依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
+
+> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
+
+## 2. 在这里新建一个访问密钥[新建密钥](https://console.cloud.tencent.com/cam/capi)
+> 将SecretId和SecretKey分别配置在仓库的secrets变量里面, TENCENT_SECRET_ID对应你的SecretId的值,TENCENT_SECRET_KEY对应你的SecretKey的值
+
+## 3. 配置自己需要secrets变量[参考这里](githubAction.md#下方提供使用到的-secrets全集合)
+### __重要的说三遍__
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+> 排查问题第一步先看自己[腾讯云函数](https://console.cloud.tencent.com/scf/list-detail?rid=5&ns=default&id=scf-jdscript)那边的环境变量跟自己在仓库配置的 `secrets` 是否一致
+
+
+
+## 4.执行action workflow进行部署,workflow未报错即部署成功
+
+## 5. 查看和测试
+登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
+
+在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
+
+
+## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
diff --git a/jd_fruit.js b/jd_fruit.js
index 2cb8ec94..327e97f3 100644
--- a/jd_fruit.js
+++ b/jd_fruit.js
@@ -1,6 +1,6 @@
/*
东东水果:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js
-更新时间:2020-12-25
+更新时间:2021-1-5
东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -29,9 +29,9 @@ let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, n
//下面给出两个账号的填写示例(iOS只支持2个京东账号)
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
//账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
- '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',
+ '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a@',
//账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
- 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',
+ 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3@2673c3777d4443829b2a635059953a28',
]
let message = '', subTitle = '', option = {}, isFruitFinished = false;
const retainWater = 100;//保留水滴大于多少g,默认100g;
@@ -771,24 +771,28 @@ async function clockInIn() {
//
async function getAwardInviteFriend() {
await friendListInitForFarm();//查询好友列表
- console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`);
- console.log(`开始删除${$.friendList.friends.length}个好友,可拿每天的邀请奖励`);
- for (let friend of $.friendList.friends) {
- console.log(`\n开始删除好友 [${friend.shareCode}]`);
- const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
- if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
- console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ if ($.friendList) {
+ console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`);
+ console.log(`开始删除${$.friendList.friends.length}个好友,可拿每天的邀请奖励`);
+ for (let friend of $.friendList.friends) {
+ console.log(`\n开始删除好友 [${friend.shareCode}]`);
+ const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
+ if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
+ console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ }
}
- }
- await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友
- if ($.friendList.inviteFriendCount > 0) {
- if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) {
- console.log('开始领取邀请好友的奖励');
- await awardInviteFriendForFarm();
- console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`);
+ await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友
+ if ($.friendList.inviteFriendCount > 0) {
+ if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) {
+ console.log('开始领取邀请好友的奖励');
+ await awardInviteFriendForFarm();
+ console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`);
+ }
+ } else {
+ console.log('今日未邀请过好友')
}
} else {
- console.log('今日未邀请过好友')
+ console.log(`查询好友列表失败\n`);
}
}
//给好友浇水
From 5d97b03e3d9505b94592184859ac033785d56163 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 09:41:24 +0800
Subject: [PATCH 074/105] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 005764d5..4290e747 100644
--- a/README.md
+++ b/README.md
@@ -85,9 +85,9 @@
### 方法二:云服务器、腾讯云函数等等
- 需自行有云服务器,云函数等
- - 腾讯云云函数 [快速部署教程](../tencentscf.md)(免费)
+ - 腾讯云云函数 [快速部署教程](./backUp/tencentscf.md)(免费)
- 腾讯云云函数控制台使用 [教程说明](iCloud.md)
- - 腾讯云云函数 [GitHub Action部署教程](../tencentscf.md#github-action-部署)
+ - 腾讯云云函数 [GitHub Action部署教程](./backUp/tencentscf.md#github-action-部署)
### 方法三:Docker(NAS或VPS用户)
From 38af91d7a8b76278ee157ade08d8c8652cb79d41 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 10:00:14 +0800
Subject: [PATCH 075/105] update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4290e747..5c424359 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@
### 方法四:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭)
-#### [京东cookie获取脚本](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js)
+ - [京东cookie获取脚本 JD_extra_cookie.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js)
### 赞赏码(开发维护不易,请赏杯茶水费)

From 9efd3882b3b067f88e86c1778b4fce3b18cd53e3 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 10:05:56 +0800
Subject: [PATCH 076/105] =?UTF-8?q?=E8=BF=81=E7=A7=BB=20iCloud.md=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
iCloud.md => backUp/iCloud.md | 10 +++++-----
backUp/tencentscf.md | 2 +-
tencentscf.md | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
rename iCloud.md => backUp/iCloud.md (98%)
diff --git a/README.md b/README.md
index 5c424359..682c55cb 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@
- 需自行有云服务器,云函数等
- 腾讯云云函数 [快速部署教程](./backUp/tencentscf.md)(免费)
- - 腾讯云云函数控制台使用 [教程说明](iCloud.md)
+ - 腾讯云云函数控制台使用 [教程说明](./backUp/iCloud.md)
- 腾讯云云函数 [GitHub Action部署教程](./backUp/tencentscf.md#github-action-部署)
diff --git a/iCloud.md b/backUp/iCloud.md
similarity index 98%
rename from iCloud.md
rename to backUp/iCloud.md
index 9eb86134..22696205 100644
--- a/iCloud.md
+++ b/backUp/iCloud.md
@@ -108,21 +108,21 @@ let CookieJDs = [
单击左侧导航栏**函数服务**,进入“函数服务”页面。
在页面上方选择一个地域,最好选择离你常用地区近点的,不至于导致账号异常。单击**新建**。如下图所示:
-
+
在“新建函数”页面填写函数基础信息,单击**下一步**。如下图所示:
-
+
**函数名称**:可以自定义,比如为jd。
**运行环境**:选择 “Nodejs 12.16”。
**创建方式**:选择 “空白函数”。
确保环境为Nodejs 12.16,执行方法改为:index.main_handler,提交方式建议选本地文件夹,然后从GitHub项目克隆Zip压缩包,解压成文件夹,然后点击这个上传把文件夹上传进来(记得node_modules文件夹一并上传或者将node_modules文件夹上传到“层”,之后选择“函数管理”-“层管理”绑定上传好的层),完了后点击下面的高级设置。
-
+
内存用不了太大,64MB就够了(64M内存,免费时长6,400,000秒,内存与免费时长大致关系可以参看云函数官方说明),超时时间改为最大的900秒,然后点击最下面的完成。
-
+
## 5.设置触发器
@@ -136,7 +136,7 @@ let CookieJDs = [
创建触发器
-
+
触发方式默认“**定时触发**”,定时任务名称随便起个名字,触发周期根据自己需要自行设置。
diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md
index 30c04ca2..eb31e499 100644
--- a/backUp/tencentscf.md
+++ b/backUp/tencentscf.md
@@ -125,4 +125,4 @@ triggers:
在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。

-## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
+## 6. 设置触发器[看这里](./backUp/iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
diff --git a/tencentscf.md b/tencentscf.md
index 30c04ca2..eb31e499 100644
--- a/tencentscf.md
+++ b/tencentscf.md
@@ -125,4 +125,4 @@ triggers:
在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。

-## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
+## 6. 设置触发器[看这里](./backUp/iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
From 534551c50b54ad6e9d1795d5bcc1605720e5978b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 10:08:18 +0800
Subject: [PATCH 077/105] fix
---
backUp/tencentscf.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md
index eb31e499..30c04ca2 100644
--- a/backUp/tencentscf.md
+++ b/backUp/tencentscf.md
@@ -125,4 +125,4 @@ triggers:
在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。

-## 6. 设置触发器[看这里](./backUp/iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
+## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
From daf86f82b30a3c82f4e56c7fe4586bd7791d86d7 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 10:27:22 +0800
Subject: [PATCH 078/105] delete
---
tencentscf.md | 128 --------------------------------------------------
1 file changed, 128 deletions(-)
delete mode 100644 tencentscf.md
diff --git a/tencentscf.md b/tencentscf.md
deleted file mode 100644
index eb31e499..00000000
--- a/tencentscf.md
+++ /dev/null
@@ -1,128 +0,0 @@
-
-# 云函数快速部署京东脚本
->
-> - 本地安装依赖使用serverless部署,[点这里](tencentscf.md#1-安装-nodejs-环境)
-> - Github Action 部署[点这里](tencentscf.md#github-action-部署)
-
-## 1. 安装 Node.js 环境
-
-Node.js 环境 [下载地址](https://nodejs.org/zh-tw/download/) ,根据自己的操作系统下载和安装。
-
-## 2. 下载代码
-
-点击红框处下载压缩包
-
-
-## 3. 安装依赖,配置 cookie
-
-### 3.1 安装依赖
-
-压缩包解压后进入项目文件夹
-
-- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口**
-- Mac 用户通过终端,自行进入该文件夹
-
-在命令行内输入 `npm i `,等待运行完成。
-
-此时,项目文件夹内会多出一个 `node_modules`文件夹
-
-### 3.2 配置 cookie
-
-打开项目文件内的 `jdCookie.js`
-
-在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔
-
-例如
-
-```javascript
-let CookieJDs = [
- 'pt_key=xxx;pt_pin=xxx;',
- 'pt_key=zzz;pt_pin=zzz;',
- 'pt_key=aaa;pt_pin=xxxaaa'
-]
-```
-
-> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md)
-
-
-## 4. 部署到云函数
-
-### 4.1 开通服务
-
-依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
-
-> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
-
-### 4.2 工具部署
-
-下载 Serverless 工具,快速部署函数
-```
-npm install -g serverless
-```
-
-执行部署命令
-```
-serverless deploy
-```
-
-如果已经配置了永久秘钥,则可以直接部署,如果没有,可以直接**微信扫码**登录腾讯云,并且授权部署。
-
-过几秒后,查看输出,可以看到函数和定时触发器都已经配置完成。
-```
-serverless ⚡framework
-Action: "deploy" - Stage: "dev" - App: "jdscript" - Instance: "jdscript"
-
-functionName: scf-jdscript
-description: This is a function in jdscript application.
-namespace: default
-runtime: Nodejs12.16
-handler: index.main_handler
-memorySize: 64
-lastVersion: $LATEST
-traffic: 1
-triggers:
- timer:
- - timer-jdscript-dev
-
-36s › jdscript › Success
-```
-
-## 5. 查看和测试
-
-登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
-
-在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
-
-
-
-> 如果需要配置永久秘钥,则可以在[访问秘钥页面](https://console.cloud.tencent.com/cam/capi)获取账号的 TENCENT_SECRET_ID,TENCENT_SECRET_KEY,并配置在代码根目录 .env 文件中。
-
-
-# Github Action 部署
-## 1. 开通服务
-
-依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
-
-> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
-
-## 2. 在这里新建一个访问密钥[新建密钥](https://console.cloud.tencent.com/cam/capi)
-> 将SecretId和SecretKey分别配置在仓库的secrets变量里面, TENCENT_SECRET_ID对应你的SecretId的值,TENCENT_SECRET_KEY对应你的SecretKey的值
-
-## 3. 配置自己需要secrets变量[参考这里](githubAction.md#下方提供使用到的-secrets全集合)
-### __重要的说三遍__
-### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
-### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
-### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
-> 排查问题第一步先看自己[腾讯云函数](https://console.cloud.tencent.com/scf/list-detail?rid=5&ns=default&id=scf-jdscript)那边的环境变量跟自己在仓库配置的 `secrets` 是否一致
-
-
-
-## 4.执行action workflow进行部署,workflow未报错即部署成功
-
-## 5. 查看和测试
-登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
-
-在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
-
-
-## 6. 设置触发器[看这里](./backUp/iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
From 392c5099af50e42bee1adee03ac00f81bbf0f740 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 12:44:30 +0800
Subject: [PATCH 079/105] =?UTF-8?q?=E4=B8=9C=E4=B8=9C=E5=86=9C=E5=9C=BA?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0log=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_fruit.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/jd_fruit.js b/jd_fruit.js
index 327e97f3..0b4b3ba2 100644
--- a/jd_fruit.js
+++ b/jd_fruit.js
@@ -771,14 +771,17 @@ async function clockInIn() {
//
async function getAwardInviteFriend() {
await friendListInitForFarm();//查询好友列表
+ console.log(`查询好友列表数据:${JSON.stringify($.friendList)}\n`)
if ($.friendList) {
console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`);
- console.log(`开始删除${$.friendList.friends.length}个好友,可拿每天的邀请奖励`);
- for (let friend of $.friendList.friends) {
- console.log(`\n开始删除好友 [${friend.shareCode}]`);
- const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
- if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
- console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ console.log(`开始删除${$.friendList.friends && $.friendList.friends.length}个好友,可拿每天的邀请奖励`);
+ if ($.friendList.friends && $.friendList.friends.length > 0) {
+ for (let friend of $.friendList.friends) {
+ console.log(`\n开始删除好友 [${friend.shareCode}]`);
+ const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
+ if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
+ console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ }
}
}
await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友
From 474729ca77e19d045beca6e64d8b0993cd8e1861 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 15:19:15 +0800
Subject: [PATCH 080/105] debug
---
jd_bean_sign.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index fb3fee0e..5ab774c7 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -131,7 +131,7 @@ async function downFile () {
async function changeFile (content) {
console.log(`开始替换变量`)
let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`);
- newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
+ // newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') {
newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`);
}
From cf5af702e0fffeff9308ce19c3e96d22aff5fbdd Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 17:39:33 +0800
Subject: [PATCH 081/105] =?UTF-8?q?=E6=94=B9=E4=B8=BAPromise.all?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_bean_sign.js | 2 +-
sendNotify.js | 24 ++++++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index 5ab774c7..fb3fee0e 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -131,7 +131,7 @@ async function downFile () {
async function changeFile (content) {
console.log(`开始替换变量`)
let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`);
- // newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
+ newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') {
newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`);
}
diff --git a/sendNotify.js b/sendNotify.js
index e32a197b..b23e2e12 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-08-19 16:12:40
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-12-21 13:52:54
+ * @Last Modified time: 2021-1-5 17:52:54
*/
const querystring = require("querystring");
const $ = new Env();
@@ -132,17 +132,21 @@ if (process.env.PUSH_PLUS_USER) {
async function sendNotify(text, desp, params = {}) {
//提供7种通知
- await serverNotify(text, desp);//微信server酱
- await pushPlusNotify(text, desp);//pushplus(推送加)
+ await Promise.all([
+ serverNotify(text, desp),//微信server酱
+ pushPlusNotify(text, desp)//pushplus(推送加)
+ ])
//由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动
text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text;
- await BarkNotify(text, desp, params);//iOS Bark APP
- await tgBotNotify(text, desp);//telegram 机器人
- await ddBotNotify(text, desp);//钉钉机器人
- await qywxBotNotify(text, desp); //企业微信机器人
- await qywxamNotify(text, desp); //企业微信应用消息推送
- await iGotNotify(text, desp, params);//iGot
- await CoolPush(text, desp);//QQ酷推
+ await Promise.all([
+ BarkNotify(text, desp, params),//iOS Bark APP
+ tgBotNotify(text, desp),//telegram 机器人
+ ddBotNotify(text, desp),//钉钉机器人
+ qywxBotNotify(text, desp), //企业微信机器人
+ qywxamNotify(text, desp), //企业微信应用消息推送
+ iGotNotify(text, desp, params),//iGot
+ CoolPush(text, desp)//QQ酷推
+ ])
}
function serverNotify(text, desp, timeout = 2100) {
From c6a3a475e94cdb0189cf9b84d4c00f96dab5ddce Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 18:02:44 +0800
Subject: [PATCH 082/105] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=90=84=E7=B1=BB?=
=?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=82=80=E8=AF=B7=E7=A0=81=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0cookie=E8=BF=87=E6=9C=9F=E5=88=A4=E6=96=AD?=
=?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E8=84=9A=E6=9C=AC=E5=8F=AF=E8=83=BD?=
=?UTF-8?q?=E4=BC=9A=E6=89=A7=E8=A1=8C=E5=87=BA=E9=94=99=E4=B8=AD=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 6 ++--
jd_get_share_code.js | 65 +++++++++++++++++++++++++++++++++++---------
2 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 682c55cb..f7497952 100644
--- a/README.md
+++ b/README.md
@@ -68,8 +68,10 @@
**TODO**
- [ ] 所有活动互助码在一个脚本打印
-## [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
-
+## 邀请码互助
+ - [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
+ - [获取各类活动互助码脚本](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js)
+ - [邀请码使用规范](githubAction.md#互助码类环境变量)(仅限云端)
## 食用方法
### 方法一:本地安装Node.js,下载本库脚本
diff --git a/jd_get_share_code.js b/jd_get_share_code.js
index 46357d5b..5b44c5cb 100644
--- a/jd_get_share_code.js
+++ b/jd_get_share_code.js
@@ -144,11 +144,14 @@ if ($.isNode()) {
$.isLogin = true;
$.nickName = '';
message = '';
+ await TotalBean();
+ if (!$.isLogin) {
+ continue
+ }
console.log(`======账号${$.index}开始======`)
await getShareCode()
- console.log(`======账号${$.index}结束======`)
+ console.log(`======账号${$.index}结束======\n`)
}
-
}
})()
.catch((e) => {
@@ -174,7 +177,7 @@ function getJdFactory() {
$.taskVos.map((item) => {
if (item.taskType === 14) {
console.log(
- `【东东工厂】${item.assistTaskDetailVo.taskToken}`
+ `【账号${$.index}(${$.nickName || $.UserName})东东工厂】${item.assistTaskDetailVo.taskToken}`
);
}
});
@@ -238,7 +241,7 @@ function getJxFactory(){
$.commodityDimId = production.commodityDimId;
$.encryptPin = data.user.encryptPin;
// subTitle = data.user.pin;
- console.log(`【惊喜工厂】${data.user.encryptPin}`);
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})惊喜工厂】${data.user.encryptPin}`);
}
} else {
$.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产
@@ -317,7 +320,7 @@ function getJdPet(){
}
console.log(
- `【京东萌宠】${$.petInfo.shareCode}`
+ `【账号${$.index}(${$.nickName || $.UserName})京东萌宠】${$.petInfo.shareCode}`
);
} else if (initPetTownRes.code === "0") {
@@ -348,7 +351,7 @@ async function getJdZZ() {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.data.shareTaskRes) {
- console.log(`【京东赚赚】${data.data.shareTaskRes.itemId}`);
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})京东赚赚】${data.data.shareTaskRes.itemId}`);
} else {
//console.log(`已满5人助力,暂时看不到您的京东赚赚好友助力码`)
}
@@ -449,7 +452,7 @@ async function getPlantBean() {
if ($.plantBeanIndexResult.code === "0") {
const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl;
$.myPlantUuid = getParam(shareUrl, "plantUuid");
- console.log(`【种豆得豆】${$.myPlantUuid}`);
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})种豆得豆】${$.myPlantUuid}`);
} else {
console.log(
@@ -513,11 +516,8 @@ async function getJDFruit() {
async function jdFruit() {
await initForFarm();
if ($.farmInfo.farmUserPro) {
- // option['media-url'] = $.farmInfo.farmUserPro.goodsImage;
- subTitle = `【京东账号${$.index}】${$.nickName}`;
- message = `【水果名称】${$.farmInfo.farmUserPro.name}`;
console.log(
- `【京东农场】${$.farmInfo.farmUserPro.shareCode}`
+ `【账号${$.index}(${$.nickName || $.UserName})京东农场】${$.farmInfo.farmUserPro.shareCode}`
);
} else {
@@ -563,7 +563,7 @@ async function getJoy(){
if (safeGet(data)) {
data = JSON.parse(data);
if (data.success && data.data && data.data.userInviteCode) {
- console.log(`【crazyJoy】${data.data.userInviteCode}`)
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})crazyJoy】${data.data.userInviteCode}`)
}
}
}
@@ -596,7 +596,46 @@ function safeGet(data) {
return false;
}
}
-
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
function taskPostUrl(function_id, body = {}, function_id2) {
let url = `${JD_API_HOST}`;
if (function_id2) {
From b5ce9c5f0a293b1a92ab0d779d75980850c985a0 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 18:04:26 +0800
Subject: [PATCH 083/105] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=90=84=E7=B1=BB?=
=?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=82=80=E8=AF=B7=E7=A0=81=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0cookie=E8=BF=87=E6=9C=9F=E5=88=A4=E6=96=AD?=
=?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E8=84=9A=E6=9C=AC=E5=8F=AF=E8=83=BD?=
=?UTF-8?q?=E4=BC=9A=E6=89=A7=E8=A1=8C=E5=87=BA=E9=94=99=E4=B8=AD=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f7497952..245ab57f 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@
## 邀请码互助
- [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
- - [获取各类活动互助码脚本](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js)
+ - [获取各类活动互助码脚本 jd_get_share_code.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js)
- [邀请码使用规范](githubAction.md#互助码类环境变量)(仅限云端)
## 食用方法
From 534faf554ff6aa4065b842604b399722a9040f9d Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 18:53:22 +0800
Subject: [PATCH 084/105] Update jd_crazy_joy_coin.js
---
jd_crazy_joy_coin.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js
index 669bf766..8824b85a 100644
--- a/jd_crazy_joy_coin.js
+++ b/jd_crazy_joy_coin.js
@@ -287,9 +287,9 @@ function getJoyShop() {
if (data.success && data.data && data.data.shop) {
const shop = data.data.shop.filter(vo => vo.status === 1) || []
$.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1;//可购买的最大等级
- if ($.isNode() && process.env.BUY_JPY_LEVEL) {
+ if ($.isNode() && process.env.BUY_JOY_LEVEL) {
$.log(`当前可购买的最高JOY等级为${$.buyJoyLevel}级\n`)
- $.buyJoyLevel = (process.env.BUY_JPY_LEVEL * 1) > $.buyJoyLevel ? $.buyJoyLevel : process.env.BUY_JPY_LEVEL * 1;
+ $.buyJoyLevel = (process.env.BUY_JOY_LEVEL * 1) > $.buyJoyLevel ? $.buyJoyLevel : process.env.BUY_JOY_LEVEL * 1;
$.cost = shop[$.buyJoyLevel - 1]['coins']
} else {
$.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity
From aaa7e7be29e1abb315915b2d274fb8f35f438fa8 Mon Sep 17 00:00:00 2001
From: huang28 <52352624+Huang28@users.noreply.github.com>
Date: Tue, 5 Jan 2021 20:37:47 +0800
Subject: [PATCH 085/105] 1
---
Loon/lxk0301_LoonTask.conf | 14 +-
QuantumultX/lxk0301_gallery.json | 2 +-
README.md | 14 +-
Surge/lxk0301_Task.sgmodule.sgmodule | 14 +-
activity/jd_apple_live.js | 2 +-
activity/jd_ds.js | 220 +++++++++
activity/jd_jdh.js | 435 ++++++++++++++++++
activity/jd_jxstory.js | 2 +-
activity/jd_live_redrain.js | 282 ++++++++++++
activity/jd_ms_redrain.js | 208 +++++++++
activity/jd_pubg.js | 2 +-
activity/jd_watch.js | 418 +++++++++++++++++
activity/jr_sign.js | 199 ++++++++
backUp/iCloud.md | 208 +++++++++
backUp/iOS_Weather_AQI_Standard.js | 138 ++++++
backUp/tencentscf.md | 128 ++++++
docker/Readme.md | 26 +-
docker/crontab_list.sh | 21 +-
docker/default_task.sh | 23 +-
jdCookie.js | 13 +-
jd_bean_home.js | 22 +-
jd_bean_sign.js | 5 +-
jd_crazy_joy.js | 2 +-
jd_crazy_joy_coin.js | 16 +-
jd_dreamFactory.js | 4 +-
jd_fruit.js | 45 +-
jd_get_share_code.js | 665 +++++++++++++++++++++++++++
jd_health.js | 2 +-
jd_jdfactory.js | 43 +-
jd_jdzz.js | 2 +-
jd_joy_reward.js | 30 ++
jd_pet.js | 2 +-
jd_plantBean.js | 31 +-
jd_small_home.js | 40 +-
jd_syj.js | 8 +-
sendNotify.js | 45 +-
serverless.yml | 18 +-
37 files changed, 3179 insertions(+), 170 deletions(-)
create mode 100644 activity/jd_ds.js
create mode 100644 activity/jd_jdh.js
create mode 100644 activity/jd_live_redrain.js
create mode 100644 activity/jd_ms_redrain.js
create mode 100644 activity/jd_watch.js
create mode 100644 activity/jr_sign.js
create mode 100644 backUp/iCloud.md
create mode 100644 backUp/iOS_Weather_AQI_Standard.js
create mode 100644 backUp/tencentscf.md
create mode 100644 jd_get_share_code.js
diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf
index 8f236711..13ff0c41 100644
--- a/Loon/lxk0301_LoonTask.conf
+++ b/Loon/lxk0301_LoonTask.conf
@@ -91,13 +91,13 @@ http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\
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 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
+# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
# 京东快递
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到
# 京东汽车
-cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车
+cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车
# 领京豆额外奖励
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励
@@ -107,19 +107,19 @@ cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_script
# 京东赚赚
cron "10 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚
# 京东秒杀红包雨
-cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨
+# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨
#注销京东店铺会员卡
cron "23 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡
# 京东直播
cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播
# 京东看一看
-cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看
+# cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看
#直播红包雨
-cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨
+# cron "1 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 1-31 12 *" 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=健康抽奖机
+cron "10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机
# 疯狂的joy日常任务
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务
diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json
index 162513d2..a3709536 100644
--- a/QuantumultX/lxk0301_gallery.json
+++ b/QuantumultX/lxk0301_gallery.json
@@ -26,7 +26,7 @@
"0 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://github.com/58xinian/icon/raw/master/jd_syj.png",
"15 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
"10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png",
- "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",
+ "0 0 * * * 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",
"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",
diff --git a/README.md b/README.md
index 8783d737..245ab57f 100644
--- a/README.md
+++ b/README.md
@@ -68,8 +68,10 @@
**TODO**
- [ ] 所有活动互助码在一个脚本打印
-## [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
-
+## 邀请码互助
+ - [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
+ - [获取各类活动互助码脚本 jd_get_share_code.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js)
+ - [邀请码使用规范](githubAction.md#互助码类环境变量)(仅限云端)
## 食用方法
### 方法一:本地安装Node.js,下载本库脚本
@@ -85,9 +87,9 @@
### 方法二:云服务器、腾讯云函数等等
- 需自行有云服务器,云函数等
- - 腾讯云云函数 [快速部署教程](tencentscf.md)(免费)
- - 腾讯云云函数控制台使用 [教程说明](iCloud.md)
- - 腾讯云云函数 [GitHub Action部署教程](tencentscf.md#github-action-部署)
+ - 腾讯云云函数 [快速部署教程](./backUp/tencentscf.md)(免费)
+ - 腾讯云云函数控制台使用 [教程说明](./backUp/iCloud.md)
+ - 腾讯云云函数 [GitHub Action部署教程](./backUp/tencentscf.md#github-action-部署)
### 方法三:Docker(NAS或VPS用户)
@@ -107,7 +109,7 @@
### 方法四:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭)
-#### [京东cookie获取脚本](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js)
+ - [京东cookie获取脚本 JD_extra_cookie.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js)
### 赞赏码(开发维护不易,请赏杯茶水费)

diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index 08b3479b..f359b012 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -53,18 +53,14 @@ cron "40 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, timeout=650, wake-system=1, tag=东东小窝
#十元街
cron "40 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, timeout=650, wake-system=1, tag=十元街
-#京东代属(仅京东学生认证用户可用)
-cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, timeout=650, wake-system=1, tag=京东代属
#领京豆额外奖励
cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励
#京东汽车
-cron "30 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车
+cron "0 0 * * *" 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 "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, timeout=7750, wake-system=1, tag=京东看一看
#京东健康
cron "20 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, timeout=750, wake-system=1, tag=京东健康
#京东赚赚
@@ -74,12 +70,6 @@ cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scri
#疯狂的joy日常任务
cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务
#以下为短期活动
-#金融打卡领年终奖
-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 "1 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=秒杀红包雨
+cron "30 2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, timeout=750, wake-system=1, tag=健康抽奖机
diff --git a/activity/jd_apple_live.js b/activity/jd_apple_live.js
index 26022817..e2d04104 100644
--- a/activity/jd_apple_live.js
+++ b/activity/jd_apple_live.js
@@ -283,7 +283,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/activity/jd_ds.js b/activity/jd_ds.js
new file mode 100644
index 00000000..46381bf9
--- /dev/null
+++ b/activity/jd_ds.js
@@ -0,0 +1,220 @@
+/*
+ * @Author: lxk0301 https://github.com/lxk0301
+ * @Date: 2020-11-27 09:19:21
+ * @Last Modified by: shylocks https://github.com/shylocks
+ * @Last Modified time: 2020-12-7 17:39:02
+ */
+/*
+京东代属脚本,类似十元街,⚠️⚠️⚠️⚠️限校园用户可使用,其他用户签到失败无京豆
+一周签到下来可获得30京豆,一天任意时刻运行一次即可
+
+更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js
+参考github@jidesheng6修改而来
+已支持IOS双京东账号, Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
+============Quantumultx===============
+[task_local]
+#京东代属
+10 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, enabled=true
+
+================Loon==============
+[Script]
+cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属
+
+===============Surge=================
+京东代属 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js
+
+============小火箭=========
+京东代属 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, cronexpr="10 7 * * *", timeout=200, enable=true
+ */
+const $ = new Env('京东代属');
+
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
+const randomCount = $.isNode() ? 20 : 5;
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/';
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ await userSignIn();
+ await showMsg();
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+
+function showMsg() {
+ return new Promise(async resolve => {
+ // $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
+ resolve()
+ })
+}
+function userSignIn() {
+ return new Promise(resolve => {
+ const body = {"activityId":"28acd0b5255d4aed866c60508ebf10f8","inviterId":"gCBrvPfINCZc+dotfvHPlA==","channel":"MiniProgram"};
+ $.get(taskUrl('userSignIn', body), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.code === 0) {
+ console.log(`今日签到成功`)
+ if (data.data) {
+ let { alreadySignDays, beanTotalNum, todayPrize, eachDayPrize } = data.data;
+ message += `【第${alreadySignDays}日签到】成功,获得${todayPrize.beanAmount}京豆 🐶\n`;
+ if (alreadySignDays === 7) alreadySignDays = 0;
+ message += `【明日签到】可获得${eachDayPrize[alreadySignDays].beanAmount}京豆 🐶\n`;
+ message += `【累计获得】${beanTotalNum}京豆 🐶\n`;
+ }
+ } else if (data.code === 81) {
+ console.log(`今日已签到`)
+ message += `【签到】失败,今日已签到`;
+ } else if (data.code === 82) {
+ console.log(`非校园用户无法签到`)
+ message += `【签到】失败,非校园用户无法签到`;
+ } else {
+ console.log(`异常:${JSON.stringify(data)}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function taskUrl(function_id, body = {}) {
+ return {
+ url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=campus-mall&client=ds_m&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`,
+ headers: {
+ "Accept": "*/*",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Host": "api.m.jd.com",
+ "Referer": "https://servicewechat.com/wxcb6c7f7be08467e3/104/page-frame.html",
+ "Cookie": cookie,
+ "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.18(0x17001231) NetType/WIFI Language/zh_CN'//$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ }
+ }
+}
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/activity/jd_jdh.js b/activity/jd_jdh.js
new file mode 100644
index 00000000..9ff14775
--- /dev/null
+++ b/activity/jd_jdh.js
@@ -0,0 +1,435 @@
+/*
+京东健康
+京东健康APP集汪汪卡瓜分百万红包
+已支持IOS双京东账号,Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
+============Quantumultx===============
+[task_local]
+#京东健康
+10 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png, enabled=true
+
+================Loon==============
+[Script]
+cron "10 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康
+
+===============Surge=================
+京东健康 = type=cron,cronexp="10 8 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js
+
+============小火箭=========
+京东健康 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, cronexpr="10 8 * * *", timeout=200, enable=true
+ */
+const $ = new Env('京东健康');
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/api';
+$.newShareCodes = ['21d9b4b51a69839577027beb0aad5105', '8edbdfa148e78f028496cff17e7df35b'];
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ await jdJdh()
+ }
+ }
+ // 帮助作者,把作者助力码放到用户助力码之后
+ await getAuthorShareCode('https://gitee.com/shylocks/updateTeam/raw/main/jd_jdh.json');
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ await helpFriends()
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+async function helpFriends(){
+ for(let i = 0; i < $.newShareCodes.length; ++i){
+ const res = await helpFriend($.newShareCodes[i])
+ if (res['data'] && res['data']['inviteCode'] === 8){
+ // 助力次数已满,跳出
+ break
+ }
+ }
+}
+function rand(min, max) {
+ min = Math.ceil(min);
+ max = Math.floor(max);
+ return Math.floor(Math.random() * (max - min + 1)) + min;
+}
+async function jdJdh() {
+ await queryShareInfo()
+ await queryInviteHome()
+ $.nowCount = $.count
+ let t = `${new Date().getUTCFullYear()}${new Date().getUTCMonth()+1}${new Date().getUTCDate()}`
+ await queryTask(15,"meetingplace") // 逛义诊会场
+ await queryTask(18,"2951198") // 看名医直播
+ await queryTask(17,"246147") //
+ await queryTask(24, t) // 辟谣
+ await doTask(22,42,`${new Date().getUTCFullYear()}-${new Date().getUTCMonth()+1}-${new Date().getUTCDate()}`) // 去打卡
+ await queryTask(20,"362451650500001") // 测一测
+ await doTask(23,40,`${rand(10000, 20000)}`) // 走路,这个可以直接提示领奖结果
+ // 以下两个需要开启家庭医生才能完成
+ await doTask(null,50,`${rand(10000, 20000)}`) // 家庭医生走路
+ await queryTask(17,"235741") // 家庭医生资讯,这个可以不用开启直接完成
+ await queryInviteHome()
+ await showMsg()
+}
+function getAuthorShareCode(url) {
+ return new Promise(resolve => {
+ $.get({url: `${url}?${new Date()}`,
+ headers:{
+ "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
+ }}, async (err, resp, data) => {
+ try {
+ if (err) {
+ } else {
+ $.newShareCodes = $.newShareCodes.concat(JSON.parse(data))
+ console.log($.newShareCodes)
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function queryShareInfo() {
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_invite_startInvite", {"channel":"jdhapp","m_patch_appid":"jdh"}), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(resp)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ console.log(`您的分享助力码为:${data.data.shareParam}`)
+ $.newShareCodes.push(data.data.shareParam)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function queryInviteHome() {
+ // 首次点击30张汪汪卡
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_invite_queryInviteHome", {"channel":"jdhapp","m_patch_appid":"jdh"}), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ $.count = data.data.ownerInfo.activityChanceCount
+ if(data.data.ownerInfo.firstVisitChance){
+ console.log(`首次访问成功,获得 ${data.data.ownerInfo.firstVisitChance}张汪汪卡`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function helpFriend(code) {
+ let body = {"channel":"jdhapp","m_patch_appid":"jdh","shareParam":code}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_invite_inviteFriends", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if(data.code === 0){
+ console.log(`助力好友 ${code} 结果:${data.data.inviteDesc}`)
+ }
+ else console.log(`助力好友 ${code} 失败,错误信息:${data.message}`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function getTaskList() {
+ let body = {"pageSize":15,"startFloor":1,"pageId":"c7c1fa16b8a94fbb97f6ec220488d01b"}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_queryFloor", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(resp)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ // console.log(data)
+ $.inviteInfo = data.data.floorDataList.filter(vo=>vo.name==="HD_Floor_Health_Month_CollectCard")[0]
+ console.log($.inviteInfo)
+ console.log(`当前助力进度:${$.inviteInfo.items[0].completeNum}/${$.inviteInfo.items[0].limitNum}`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function queryTask(taskType,infoId) {
+ let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskType":taskType,"infoId":infoId}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_task_queryTask", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if(data.data&&data.data.length>0)
+ await doTask(taskType,data.data[0].id,infoId)
+ else
+ console.log(`任务已做过`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function doTask(taskType,taskId,infoId) {
+ let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskId":taskId, "infoId":infoId}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_task_doTask", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ console.log(data.message)
+ // await rewardTask(taskType,taskId,infoId)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function doTask2(taskType,taskId,infoId) {
+ let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskId":taskId, "infoId":infoId}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_task_doTask", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ console.log(data.message)
+ // await rewardTask(taskType,taskId,infoId)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function rewardTask(taskType,taskId,infoId) {
+ // 会报 no access 无解
+ let body = {"channel":"jdhapp","m_patch_appid":"jdh",
+ "taskId":taskId,"taskType":taskType,"infoId":infoId}
+ return new Promise(resolve => {
+ $.get(taskUrl("jdh_task_getReward", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ console.log(data)
+ if (data.code ===0) {
+ console.log(data.data.extResult.mainTitle)
+ }else{
+ console.log(data.data.msg)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+async function showMsg() {
+ message = `获得${$.count - $.nowCount}张汪汪卡,共${$.count}张汪汪卡\n任务已做完,请手动领取奖励`
+ if ($.isNode() && !jdNotify) {
+ await notify.sendNotify(`【京东账号${$.index}】${$.nickName} `, `【${$.name}】${message}`);
+ } else {
+ $.log(`京东账号${$.index}${$.nickName}\n${message}`);
+ }
+}
+
+function taskPostUrl(function_id, body = {}) {
+ return {
+ url: `${JD_API_HOST}?functionId=${function_id}`,
+ body: body,
+ headers: {
+ "Cookie": cookie,
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'accept': 'application/json, text/plain, */*',
+ 'origin': 'https://hlc.m.jd.com',
+ 'referer': 'https://hlc.m.jd.com/Question_Answer_Rumour/answerComplete',
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
+ }
+ }
+}
+function taskUrl(function_id, body = {}) {
+ return {
+ url: `${JD_API_HOST}?functionId=${function_id}&appid=JDHAPP&clientVersion=2.1.7&body=${escape(JSON.stringify(body))}`,
+ headers: {
+ "Cookie": cookie,
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'accept': 'application/json, text/plain, */*',
+ 'origin': 'https://hlc.m.jd.com',
+ 'referer': 'https://hlc.m.jd.com/Question_Answer_Rumour/answerComplete',
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
+ }
+ }
+}
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/activity/jd_jxstory.js b/activity/jd_jxstory.js
index cd46e3ed..45c79941 100644
--- a/activity/jd_jxstory.js
+++ b/activity/jd_jxstory.js
@@ -498,7 +498,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/activity/jd_live_redrain.js b/activity/jd_live_redrain.js
new file mode 100644
index 00000000..4de7cad5
--- /dev/null
+++ b/activity/jd_live_redrain.js
@@ -0,0 +1,282 @@
+/*
+直播红包雨
+每天0,9,11,13,15,17,19,20,21,23可领,每日上限未知
+活动时间:2020-12-14 到 2020-12-31
+更新地址: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/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/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/jd_live_redrain.js
+
+============小火箭=========
+直播红包雨 = 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('直播红包雨');
+let ids = {
+ '0': 'RRA3S6TRRbnNNuGN43oHMA5okbcXmRY',
+ '9': 'RRA3vyGH4MRwCJELDwV7p24mNAByiSk',
+ '11': 'RRAnabmRSnpzSSZicXUhSFGBvFXs5c',
+ '13': 'RRA4RhWMc159kA62qLbaEa88evE7owb',
+ '15': 'RRA2CnovS9KVTTwBD9NV7o4kc3P8PTN',
+ '17': 'RRA2nFXT2oSQM3KaYX9uhBC1hBijDey',
+ '19': 'RRA3SQpuSAAJq1ckoPr4TXaxwbLG73k',
+ '20': 'RRA2cHV3KXqvHAZGboTTryr8JMYZd5j',
+ '21': 'RRA3SPs4XrDEXXwQjEFGrBLtMpjtkMV',
+ '23': 'RRA3dFHoZXGThSnctvtAf69dmVyEDfm',
+}
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ 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);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/api';
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ $.log(`=====远程红包雨信息=====`)
+ await getRedRain();
+ if(!$.activityId) return
+ let nowTs = new Date().getTime()
+ if (!($.st <= nowTs && nowTs < $.ed)) {
+ $.log(`远程红包雨配置获取错误,从本地读取配置`)
+ $.log(`\n`)
+ let hour = (new Date().getUTCHours() + 8) %24
+ if (ids[hour]){
+ $.activityId = ids[hour]
+ $.log(`本地红包雨配置获取成功`)
+ } else{
+ $.log(`无法从本地读取配置,请检查运行时间`)
+ return
+ }
+ } else{
+ $.log(`远程红包雨配置获取成功`)
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = `【${new Date().getUTCHours()+8}点${$.name}】`
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ await receiveRedRain();
+ await showMsg();
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+
+async function showMsg() {
+ if ($.isNode() && !jdNotify) {
+ await notify.sendNotify(`【京东账号${$.index}】${$.nickName}`, message)
+ }
+ return new Promise(resolve => {
+ $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ resolve()
+ })
+}
+
+function getRedRain() {
+ return new Promise(resolve => {
+ $.get({
+ url: "http://ql4kk90rw.hb-bkt.clouddn.com/jd_live_redRain.json?" + Date.now(),
+ }, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`1111${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ $.activityId = data.activityId
+ $.st = data.startTime
+ $.ed = data.endTime
+ console.log(`下一场红包雨开始时间:${new Date(data.startTime)}`)
+ console.log(`下一场红包雨结束时间:${new Date(data.endTime)}`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+
+function receiveRedRain() {
+ return new Promise(resolve => {
+ const body = {"actId": $.activityId};
+ $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.subCode === '0') {
+ console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`)
+ // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
+ message += `领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)} 京豆\n`
+
+ } else if (data.subCode === '8') {
+ console.log(`领取失败,已领过`)
+ message += `领取失败,已领过\n`;
+ } else {
+ console.log(`异常:${JSON.stringify(data)}`)
+ message += `暂无红包雨\n`;
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+
+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()}`,
+ headers: {
+ "Accept": "*/*",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Host": "api.m.jd.com",
+ "Referer": "https://h5.m.jd.com/active/redrain/index.html",
+ "Cookie": cookie,
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ }
+ }
+}
+
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/activity/jd_ms_redrain.js b/activity/jd_ms_redrain.js
new file mode 100644
index 00000000..c2ea858e
--- /dev/null
+++ b/activity/jd_ms_redrain.js
@@ -0,0 +1,208 @@
+/*
+秒杀红包雨,可以获取3次,一天运行一次即可
+活动时间:2020-12-1 到 2020-12-31
+活动入口:首页👉秒杀👉往下拉(手指向上滑动)👉可以看到狂撒2亿京东
+更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js
+已支持IOS双京东账号, Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
+============Quantumultx===============
+[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_redPacket.png, enabled=true
+
+================Loon==============
+[Script]
+cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨
+
+===============Surge=================
+秒杀红包雨 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js
+
+============小火箭=========
+秒杀红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, cronexpr="10 7 * * *", timeout=200, enable=true
+ */
+const $ = new Env('秒杀红包雨');
+
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
+const randomCount = $.isNode() ? 20 : 5;
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/api';
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ for(let i=0;i<3;++i){
+ await getRedRain();
+ await $.wait(5000); //防止黑号
+ }
+ await showMsg();
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+
+function showMsg() {
+ return new Promise(async resolve => {
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
+ resolve()
+ })
+}
+function getRedRain() {
+ return new Promise(resolve => {
+ const body = {"actId":"RRA318jCtaXhZJgiLryM1iydEhc7Jna"};
+ $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.subCode === '0') {
+ console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`)
+ // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
+ message+= `${data.lotteryResult.jPeasList[0].ext}:${(data.lotteryResult.jPeasList[0].quantity)}京豆\n`
+
+ } else if (data.subCode === '8') {
+ console.log(`今日次数已满`)
+ message += `领取失败,今日已签到\n`;
+ } else {
+ console.log(`异常:${JSON.stringify(data)}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+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}`,
+ headers: {
+ "Accept": "*/*",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Host": "api.m.jd.com",
+ "Referer": "https://h5.m.jd.com/active/redrain/index.html",
+ "Cookie": cookie,
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ }
+ }
+}
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/activity/jd_pubg.js b/activity/jd_pubg.js
index bed15df4..cc22b60c 100644
--- a/activity/jd_pubg.js
+++ b/activity/jd_pubg.js
@@ -330,7 +330,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/activity/jd_watch.js b/activity/jd_watch.js
new file mode 100644
index 00000000..f1f9f25a
--- /dev/null
+++ b/activity/jd_watch.js
@@ -0,0 +1,418 @@
+/*
+发现-看一看
+活动结束时间未知
+已支持IOS双京东账号,Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
+脚本已内置需要抓的各40个包,但还建议自行抓包使用。
+使用 Charles 抓包,使用正则表达式:functionId=disc(AcceptTask|DoTask) 过滤请求
+选中所有请求,将所有请求保存为 JSON Session File 名称为 watch.chlsj,将该文件与jd_watch.js放在相同目录中
+使用手机抓包,将functionId=discAcceptTask的请求填入acceptBody,将discDoTask的body填入doBody
+云端使用:将所抓的两种包使用@符号隔开后,分别填入到WATCH_ACCEPTBODY、WATCH_DOBODY环境变量
+============Quantumultx===============
+[task_local]
+#京东看一看
+10 9 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看, enabled=true
+
+================Loon==============
+[Script]
+cron "10 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js,tag=京东看一看
+
+===============Surge=================
+京东看一看 = type=cron,cronexp="10 9 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js
+
+============小火箭=========
+京东看一看 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, cronexpr="10 9 * * *", timeout=900, enable=true
+ */
+const $ = new Env('京东看一看');
+let acceptBody = [
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240304968%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=6e2542bc745427327751374bafb0ae9f&st=1608135453301&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232107521%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=f1e01b42473e124f529b34d3735dd8cd&st=1608135468216&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239958722%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=30a2d1a585cd96bf57e95aef4165243f&st=1608135483804&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22236677182%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=367aa97b9a7b3f2c655fd5fe06fcd6e8&st=1608135497273&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238431608%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=528497aa9b9b3d932a889878b1bde4bd&st=1608135517143&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241148628%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7fa66f4476ee64d6085e472882b6a2ae&st=1608135530948&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239304423%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=c96cdb81d78ce1863e4f8f04de9ab02d&st=1608135545789&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239883460%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=94024b2f8b9601b287eb892b77a8d664&st=1608135560829&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240083804%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fdf5ae7ba7b94629ba7c2b80e2fbdb9f&st=1608135574998&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240424814%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=39272f2f00f8bef1907dfe4cd6d6bd2b&st=1608135588583&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241354811%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2bf2bf47ea7372328e7d5e86db706a7c&st=1608135602797&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239763353%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fe03d9b6a1d711b9c16956a2a2eccc4c&st=1608135616512&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239887467%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4dd106e346bc57c4d5f8f5d2094b8ca4&st=1608135633772&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911566%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=78041fe3337060c1c6dc93f87828b0f2&st=1608135656081&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239209307%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1c56c633ea8664a1254a615cb9e08608&st=1608135674705&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232756870%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=005a17ff4b97e822c5ba0f4ad82e82a6&st=1608135691877&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239906757%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=aaef3fdea5bffafe30c5a8038e924ea2&st=1608135705696&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238055250%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=5a7f7629dcf9714cf849eb7c198e75d4&st=1608135719481&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911025%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bc5d52bc1ae461b861efdc0e80b53fb9&st=1608135732696&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232075505%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=e3159f46f03193f4ff37555ac2ce3347&st=1608135747723&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230306175%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=ef74243798ed813e1a7318002fd9b658&st=1608135764036&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232072753%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9c9bd997e65ffce799fe117bbe700e83&st=1608135777862&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230354156%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=f4bd50d42d37d901f2eae9aeb92097be&st=1608135793215&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230474392%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8e7774c8053ff1b365d9742064b575e8&st=1608135807319&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241113475%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8a9a3baa7ad9de8752f40a020d02b9ed&st=1608135821860&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240814080%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cf060e827388757075639b488e10a271&st=1608135837068&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239281739%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=265def4ee8405300076ebecb8bc16244&st=1608135850992&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239326056%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=0c06232d2d28875540ba2be7e3cf0248&st=1608135864617&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239966731%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a57bc6809cb01c4bf0807c15be141100&st=1608135879159&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228925366%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7cfec28169bec339ca5d58083bff413e&st=1608135892590&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241141664%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1268ce3aa86c9fd1ceb3dab244801be1&st=1608135922596&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239879879%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=727339ecac9c040a6a8020b4462ed085&st=1608135944029&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240921105%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=dad6edd5a8f5352039637e55b853c58b&st=1608135958263&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239913667%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=263a98386f5a2ce3317727d5cd35ae31&st=1608135972412&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228195657%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bca8c830cb94089c31fa4039596d49e8&st=1608135986945&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232232068%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=40a4ee9d60a14b3fcba4586502f0940b&st=1608136001520&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22231078213%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=83672faa82ff55d2e01a86551c53bf57&st=1608136015469&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228889429%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1d5f374fe483ee83e8b10a4c213c3e4f&st=1608136032181&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239891037%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=98bc0ee5edf5790cb968ac5705939a23&st=1608136046783&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239349437%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a0851d4dd20ea28e463b38c2604220c5&st=1608135079843&sv=120&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJbL8Z8Ji5qW2Orjpl0%2BzyRPbn4M%2BsWaSKGP0oBktuYYM5pyBaI0RqkeXBgu6TJZdGHo2xvPne18Dzkk1A7m%2BLqBuD2mrzLZjK%2BrWdDdNBD9pQPajs0rQAp%2Bu4eLnMSDTc7xxKGmxZ6YlvLbYtQu1%2B/z4woT25IKqETrcboP4nZzsjKlRbBnlsrQ%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=unknown`
+]
+let doBody = [
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240304968%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a33e35fe4dbaebc0bb6cf31acf696624&st=1608135463915&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232107521%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a3133bb0bdd798b3264b94fbe25fe39f&st=1608135478529&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239958722%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=01e35c947f923e9818180e6e7aa7767f&st=1608135494151&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22236677182%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8fe3ce466b10be78b721560d8ae37a0c&st=1608135507710&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238431608%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=76dbae0f7044496b445996cce4625462&st=1608135527407&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241148628%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=77a5ee97b33f4a3278899e68136ece47&st=1608135541366&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239304423%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4e06a172b3fd68a0f61af4eb9bd96f3b&st=1608135556280&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239883460%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=20ab69a69fbe79c35b5ef680330957bc&st=1608135571343&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240083804%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a62f9e3a83f38109038ce6542ca47791&st=1608135585500&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240424814%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fc5c80a2660f1f02c5c7dec0b1fd3a28&st=1608135599007&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241354811%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a5d979f12d580c2704cc109542567501&st=1608135613226&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239763353%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=65c634dfc07ea15edfb40d55db1e5af4&st=1608135626981&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239887467%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4c2e554b8a38234c0bcd2c96bb84b980&st=1608135644097&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911566%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bd2ea3163b169eae08a50ba193248ff2&st=1608135666530&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239209307%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7a89d628a4f83130accce92ea928ff31&st=1608135684848&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232756870%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cb6fe5ac83bd71f14ab1d1603158df43&st=1608135702313&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239906757%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=ec6f3b9600854f398e6938b3db66f644&st=1608135716033&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238055250%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=074730c1d3a2f27f3dc90f791d9b5a6d&st=1608135729763&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911025%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fb2c75fd39c07ced2c72c58d7d17fd61&st=1608135742970&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232075505%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2df23f8cf9f729caf39cfc37be2e5cbb&st=1608135758073&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230306175%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9661628a4a9fbea9090851a711ce493e&st=1608135774356&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232072753%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fd5871c8c2f6cdd7aeec608b9a920a15&st=1608135788189&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230354156%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=53de468b75938e0f97bf3ac565e6541f&st=1608135803533&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230474392%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=969330bffe9c6ad2ea30e5675d58c8a0&st=1608135817731&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241113475%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=154516384d1cd467fe64e11444b2c731&st=1608135832187&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240814080%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=517e373df7f0929524dc36fe6dad630d&st=1608135847506&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239281739%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9238b4f17dbb8f46f3f61898588c09f2&st=1608135861442&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239326056%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=c440b5ccd3393566befc3da4a3a32c23&st=1608135874985&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239966731%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4e92a93c2985165670d4bdd8fac62b62&st=1608135889532&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228925366%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=462d9bb4f828f495797d82e6b403789d&st=1608135902900&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241141664%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7283e2c5a24e392c66dc02b1e073f154&st=1608135932827&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239879879%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2efca2d6ae6971cb924ca2de521548cf&st=1608135954339&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240921105%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=24cff3a417bb95f9360cbae5a90dc2df&st=1608135968677&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239913667%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1f3983c32ad4f6aff614018e06ba0210&st=1608135982853&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228195657%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cd5639e8f4e8ae35ab8ac9593d71f2ed&st=1608135997381&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232232068%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=5270d376f680afaee053c7d3a760f24c&st=1608136011993&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22231078213%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=103ba8fdc7fcf377e40360a089bbba6d&st=1608136025797&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228889429%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=b57fa95ca54dd0a6104c5aff99efa60e&st=1608136042516&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239891037%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=37907fdd42eb90cdb38b1534b5f82623&st=1608136057117&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`,
+ `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239349437%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=de5492702084ea8d64e77b5a05a26508&st=1608135090210&sv=111&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJbL8Z8Ji5qW2Orjpl0%2BzyRPbn4M%2BsWaSKGP0oBktuYYM5pyBaI0RqkeXBgu6TJZdGHo2xvPne18Dzkk1A7m%2BLqBuD2mrzLZjK%2BrWdDdNBD9pQPajs0rQAp%2Bu4eLnMSDTc7xxKGmxZ6YlvLbYtQu1%2B/z4woT25IKqETrcboP4nZzsjKlRbBnlsrQ%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=unknown`,
+]
+
+function preload(){
+ const fs = require('fs');
+ let raw = fs.readFileSync('watch.chlsj');
+ let s = JSON.parse(raw);
+ s.map(vo=>{
+ let doTask = vo.request.header.headers.filter(vo=>vo['name'] === ":path" && vo['value'].indexOf('discDoTask')>0)[0]
+ if(doTask){
+ doBody.push(vo.request.body.text)
+ }else{
+ acceptBody.push(vo.request.body.text)
+ }
+ })
+}
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/client.action';
+!(async () => {
+ if ($.isNode()) {
+ const fs = require('fs');
+ try {
+ if (fs.existsSync('watch.chlsj')) {
+ preload()
+ if (doBody.length < 40) {
+ console.log(`${$.name}Body数小于40,无法完成任务!`)
+ }
+ }
+ if (process.env.WATCH_ACCEPTBODY && process.env.WATCH_DOBODY) {
+ acceptBody = process.env.WATCH_ACCEPTBODY.split('@');
+ doBody = process.env.WATCH_DOBODY.split('@');
+ console.log(`\n环境变量提供的acceptBody数量:${acceptBody.length}`)
+ console.log(`环境变量提供的doBody:数量${doBody.length}\n`)
+ }
+ } catch (err) {
+ console.error(err)
+ }
+ console.log(`\nacceptBody数量:${acceptBody.length}`)
+ console.log(`doBody:数量${doBody.length}\n`)
+ }
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ await jdHealth()
+ await showMsg();
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+async function jdHealth() {
+ $.bean = 0
+ await getTaskList()
+ if($.task) {
+ console.log(`${$.name}浏览次数:${$.task.times}/${$.task.maxTimes}`)
+ let i = 0, j = $.task.times
+ while(j < $.task.maxTimes) {
+ if (!acceptBody[i]) break
+ let res = await acceptTask(acceptBody[i++])
+ if (res['success']) {
+ await $.wait(10000)
+ await doTask(doBody[i-1])
+ j++
+ }
+ await $.wait(500);
+ }
+ await getTaskList()
+ if ($.task.times===$.task.maxTimes)
+ await reward()
+ }
+}
+
+function showMsg() {
+ return new Promise(async resolve => {
+ // $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`);
+ }
+ resolve()
+ })
+}
+// 任务列表
+function getTaskList() {
+ let body = "body=%7B%22bizType%22%3A1%2C%22referPageId%22%3A%22discRecommend%22%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=200&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=7ac41799deb4b174516255f911adb612&st=1607942822112&sv=100&uts=0f31TVRjBStSN/KN45aFsqdm3cWx37OzS1DDtk92Jjb1GFDLcR3WqIplv0XA1h/hn4ycbABQbxmY2Z6OJ41XlUNqODg0xhlFxdy9vzwBobHzhtVmCcORklu9W1cB6YcW0kYJNzSsy5ypxaQvGUf1oq/yMw/Hbo5lD3f4srHsrWzrsnKQ4K7HYtCFiZ5kn/AC%2B/tEmJRu9yM5j2nCMqdvmg%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D"
+ return new Promise(resolve => {
+ $.post(taskPostUrl("discTaskList", body), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.busiCode === '0') {
+ $.task = data['data']['discTasks'][1]
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+// 开始看
+function acceptTask(body) {
+ return new Promise(resolve => {
+ $.post(taskPostUrl("discAcceptTask", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if(data.success){
+ // console.log('浏览开始请求成功')
+ }else{
+ // console.log(`${data.message}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+// 完成看
+function doTask(body) {
+ return new Promise(resolve => {
+ $.post(taskPostUrl("discDoTask", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if(data.success){
+ console.log(`浏览成功,浏览进度:${data.data.alreadyBrowseNum}/${data.data.totalBrowseNum}`)
+ }else{
+ console.log(`${data.message}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+// 完成看
+function reward() {
+ let body = "area=12_904_908_57903&body=%7B%22taskId%22%3A%223%22%2C%22bizType%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=200&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=17715aee2221001db42054582e246b12&st=1608106937687&sv=102&uts=0f31TVRjBSueCA6d1433N/VvOpFVgTQ3ayM3m/f8v%2B5SZcxHDy1W0aeMpwRE60%2B5NCC1QBAEVnTfdyUBY1v5dzjJYNmtBpfPHeEOqjU2lcvvt9i4lMwuL6cFvhiheX1QlG4SCsmZu6Zhj5aCQji0PhIRINWPoPq7tOwraAhYokfkEoI1Vcv3DgT8TKdKMtBfCtTr%2BEIaEPSfItFIJPlqXw%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D"
+ return new Promise(resolve => {
+ $.post(taskPostUrl("discReceiveTaskAward", body), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if(data.success){
+ console.log(`领奖成功,${$.task.taskSubTitleExt}`)
+ message += `京东看一看:${$.task.taskSubTitleExt}`;
+ await showMsg();
+ }else{
+ console.log(`领奖失败,${data.message}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+}
+function taskPostUrl(function_id, body = {}) {
+ $.log(`${function_id}`)
+ return {
+ url: `${JD_API_HOST}?functionId=${function_id}`,
+ body: body,
+ headers: {
+ "Cookie": cookie,
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ }
+ }
+}
+
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/activity/jr_sign.js b/activity/jr_sign.js
new file mode 100644
index 00000000..40c9a018
--- /dev/null
+++ b/activity/jr_sign.js
@@ -0,0 +1,199 @@
+/*
+金融打卡领年终奖
+活动时间:2020-12-8 到 2020-12-31
+更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js
+已支持IOS双京东账号, Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
+============Quantumultx===============
+[task_local]
+#金融打卡领年终奖
+10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true
+
+================Loon==============
+[Script]
+cron "10 6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖
+
+===============Surge=================
+金融打卡领年终奖 = type=cron,cronexp="10 6 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js
+
+============小火箭=========
+金融打卡领年终奖 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, cronexpr="10 6 * * *", timeout=200, enable=true
+ */
+const $ = new Env('金融打卡领年终奖');
+
+const notify = $.isNode() ? require('./sendNotify') : '';
+//Node.js用户请在jdCookie.js处填写京东ck;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+//IOS等用户直接用NobyDa的jd cookie
+let cookiesArr = [], cookie = '', message;
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {
+ };
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
+}
+const JD_API_HOST = 'https://api.m.jd.com/api';
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
+ if (!$.isLogin) {
+ $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+
+ if ($.isNode()) {
+ await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
+ }
+ continue
+ }
+ await sign()
+ await showMsg();
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+
+function showMsg() {
+ return new Promise(async resolve => {
+ let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000;
+ if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) {
+ $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"});
+ if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`)
+ } else {
+ $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`);
+ }
+ resolve()
+ })
+}
+
+
+function sign() {
+ return new Promise(resolve => {
+ $.post(taskUrl(), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ console.log(data.resultData.message)
+ message += `${data.resultData.message}`
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+
+function taskUrl() {
+ return {
+ url: `https://ms.jr.jd.com/gw/generic/hy/h5/m/signIn12?_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
+ body : 'reqData=%7B%22channelLv%22%3A%22changjinglouceng%22%2C%22site%22%3A%22JD_JR_APP%22%7D',
+ headers: {
+ "Accept": "*/*",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Host": "ms.jr.jd.com",
+ "Referer": "https://member.jr.jd.com/activities/signin-annual/index.html?channelLv=changjinglouceng&jrcontainer=h5&jrlogin=true",
+ "Cookie": cookie,
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ }
+ }
+}
+
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
+ return [];
+ }
+ }
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/backUp/iCloud.md b/backUp/iCloud.md
new file mode 100644
index 00000000..22696205
--- /dev/null
+++ b/backUp/iCloud.md
@@ -0,0 +1,208 @@
+## 1.安装 Node.js 环境
+
+[下载地址](https://nodejs.org/zh-tw/download/ )
+
+根据自己的操作系统下载
+
+傻瓜式安装,一直下一步即可。
+
+
+
+## 2.下载源码
+
+
+
+点击红框处下载压缩包
+
+## 3.安装依赖、增加入口文件、增加cookie
+
+压缩包解压后进入项目文件夹
+
+- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口**
+- Mac 用户通过终端,自行进入该文件夹
+
+在命令行内输入 `npm i `,等待运行完成。
+
+此时,项目文件夹内会多出一个 `node_modules`文件夹
+
+ **增加入口文件**
+
+方案一:同一个仓库下同一个时间,执行多个脚本
+
+在项目文件夹内新建 `index.js`
+
+编辑文件
+
+```javascript
+'use strict';
+exports.main_handler = async (event, context, callback) => {
+ //解决云函数热启动问题
+ delete require.cache[require.resolve('./jd_xtg1.js')];
+ require('./jd_xtg1.js') //这里写你想要的脚本
+ require('./jd_xtg2.js') //这里写你想要的脚本
+ require('./jd_xtg3.js') //这里写你想要的脚本
+}
+
+```
+此时,同一时间点下,会同时执行多个脚本,触发器触发后,index.js文件中require()下的所有脚本都会被执行
+
+**优点**:同一时间下可以同时执行多个脚本,适合脚本种类少的repository,对脚本数量少的repository推荐使用此方案
**缺点**:多个脚本不同时间点运行无法满足
+
+方案二:同一个仓库下不同的时间点,分别执行不同的脚本(类似GitHub Action执行机制)
+
+在项目文件夹内新建 `index.js`
+
+编辑文件
+
+```javascript
+'use strict';
+exports.main_handler = async (event, context, callback) => {
+ for (const v of event["Message"].split("\r\n")) {
+ //解决云函数热启动问题
+ delete require.cache[require.resolve(`./${v}.js`)];
+ console.log(v);
+ require(`./${v}.js`)
+ }
+}
+
+```
+
+此时触发管理按照下图中进行设置,附加信息选择“是”,内容填写需要传递执行的具体脚本文件名,以回车键换行。触发器触发后,附加信息栏内的脚本会被执行,设置多个不同时间点的触发器达到类似GitHub Action的效果
+
+**优点**:可以满足个性化需求,同一个repository下只需要设置不同的触发器,可以实现不同时间点分别执行不同的脚本
**缺点**:repository下脚本过多,如果需要设置多个触发器,实现个性化运行效果,由于云函数的限制,最多只能设置10个
+
+[](https://imgchr.com/i/B20KxI)
+[](https://imgchr.com/i/BRCG0H)
+
+**注意:**
+Ⅰ方案一与方案二不能混合到同一个index.js文件中使用,同一个仓库下,二者只能选择其一。
+Ⅱ感谢[issues#115](https://github.com/lxk0301/jd_scripts/issues/115)中的解决方案,目前云函数连续测试已经可以规避热启动问题了。
+Ⅲ在确保完全按照本教程设置的情况下测试云函数运行情况,对于部分人运行日志中出现某些脚本运行失败其他正常,并且错误提示带有strict字样的,请自行删除index.js中的```'use strict';```,再做测试
+
+ **增加cookie**
+
+打开项目文件内的 `jdCookie.js`
+
+在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔
+
+例如
+
+```javascript
+let CookieJDs = [
+ 'pt_key=xxx;pt_pin=xxx;',
+ 'pt_key=zzz;pt_pin=zzz;',
+ 'pt_key=aaa;pt_pin=xxxaaa'
+]
+```
+
+
+
+## 4.上传至腾讯云
+
+[腾讯云函数地址]( https://console.cloud.tencent.com/scf/index )
+
+编写函数
+
+登录后,点击管理控制台
+
+单击左侧导航栏**函数服务**,进入“函数服务”页面。
+在页面上方选择一个地域,最好选择离你常用地区近点的,不至于导致账号异常。单击**新建**。如下图所示:
+
+
+
+在“新建函数”页面填写函数基础信息,单击**下一步**。如下图所示:
+
+
+
+**函数名称**:可以自定义,比如为jd。
**运行环境**:选择 “Nodejs 12.16”。
**创建方式**:选择 “空白函数”。
+
+确保环境为Nodejs 12.16,执行方法改为:index.main_handler,提交方式建议选本地文件夹,然后从GitHub项目克隆Zip压缩包,解压成文件夹,然后点击这个上传把文件夹上传进来(记得node_modules文件夹一并上传或者将node_modules文件夹上传到“层”,之后选择“函数管理”-“层管理”绑定上传好的层),完了后点击下面的高级设置。
+
+
+
+内存用不了太大,64MB就够了(64M内存,免费时长6,400,000秒,内存与免费时长大致关系可以参看云函数官方说明),超时时间改为最大的900秒,然后点击最下面的完成。
+
+
+
+## 5.设置触发器
+
+点击刚创建的函数
+
+
+
+点击如图所示
+
+
+
+创建触发器
+
+
+
+触发方式默认“**定时触发**”,定时任务名称随便起个名字,触发周期根据自己需要自行设置。
+
+想进阶使用触发器的自行查看本文中方案一和方案二中的说明
+
+关于触发周期中的自定义触发周期,使用的是 Cron表达式,这个自行学习下吧
+
+
+[Corn文档](https://cloud.tencent.com/document/product/583/9708#cron-.E8.A1.A8.E8.BE.BE.E5.BC.8F)
+
+目前repo中按照每个脚本一个定时器的方式设置到云函数中,大约需要触发器10多个,由于云函数触发器限制最多10个,需要对触发器进行整合,整合后触发器保持在10个以内,以下设置仅供参考
+
+| **JavaScript** | **脚本名称** | **活动时间** | **原Repository UTC时间** | **适用于云函数的北京时间** | **serverless.yml** |
+| :----------------------: | :----------------------: | :----------: | :-----------------------: | :-------------------------: | :----------------: |
+| `jd_bean_change` | 京豆变动通知 | 长期 | 0 2 * * * | 0 1 */1 * * | 30 7 * * * |
+| `jd_bean_home` | 领京豆额外奖励 | 长期 | / | 0 1 */1 * * | 30 7 * * * |
+| `jd_bean_sign` | 京豆签到 | 长期 | 0 16 * * * | 0 0 */1 * * | 0 0 * * * |
+| `jd_blueCoin` | 京小超兑换奖品 | 长期 | 0 16 * * * | 0 1 */1 * * | 0 0 * * * |
+| `jd_car` | 京东汽车 | 长期 | / | 0 0 */1 * * | 0 0 * * * |
+| `jd_club_lottery` | 摇京豆 | 长期 | 0 16 * * * | 0 0 */1 * * | 0 0 * * * |
+| `jd_crazy_joy` | 疯狂的joy | 长期 | / | / | 30 7 * * * |
+| `jd_crazy_joy_coin` | 疯狂的joy挂机 | 长期 | / | / | / |
+| `jd_daily_egg` | 京东金融-天天提额 | 长期 | 10 */3 * * * | 0-12/3 */3 * * * | 8 */3 * * * |
+| `jd_dreamFactory` | 京喜工厂 | 长期 | / | */30 * * * * | 3 */1 * * * |
+| `jd_ds` | 京东代属(校园用户) | 长期 | / | / | / |
+| `jd_fruit` | 东东农场 | 长期 | 20 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6 * * * |
+| `jd_health` | 健康抽奖机 | 短期 | / | 0 0 */1 * * | 10 0 * * * |
+| `jd_jdfactory` | 东东工厂 | 长期 | / | */30 * * * * | 3 */1 * * * |
+| `jd_jdh` | 京东健康APP | 短期 | / | / | 30 7 * * * |
+| `jd_jdzz` | 京东赚赚 | 长期 | / | / | 3 1 * * * |
+| `jd_joy` | 宠汪汪 | 长期 | 0 0,1,4,10,15,16 * * * | 0,5,10 8,9,12,18,23,0 * * * | 3 */1 * * * |
+| `jd_joy_feedPets` | 宠汪汪单独喂食 | 长期 | */20 */1 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_joy_help` | 宠汪汪强制为别人助力 | 长期 | / | / | / |
+| `jd_joy_reward` | 宠汪汪兑换奖品 | 长期 | 0 0,4,8,16 * * * | 0 8,12,16,0 */1 * * | 0 0-16/8,20 * * * |
+| `jd_joy_run` | 宠汪汪邀请助力与赛跑助力 | 长期 | / | / | / |
+| `jd_joy_steal` | 宠汪汪偷好友狗粮与积分 | 长期 | 0 16,22 * * * | 0 0,6,20 */1 * * | 0 0-16/8,20 * * * |
+| `jd_kd` | 京东快递 | 长期 | / | 0 1 */1 * * | 3 1 * * * |
+| `jd_live` | 京东直播18豆 | 长期 | / | / | 0 0-16/8,20 * * * |
+| `jd_live_redrain` | 超级直播间红包雨 | 短期 | / | 0 0,20,9-23/2 * * MON-FRI | / |
+| `jd_lotteryMachine` | 京东抽奖机 | 长期 | 11 17 * * * | 0 0 */1 * * | 10 0 * * * |
+| `jd_moneyTree` | 摇钱树 | 长期 | 40 */3 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_ms_redrain` | 秒杀红包雨 | 短期 | / | 0 1 */1 * * | 10 0 * * * |
+| `jd_necklace` | 点点券 | 长期 | / | 0 0,6,20 */1 * * | 0 0-16/8,20 * * * |
+| `jd_pet` | 东东萌宠 | 长期 | 35 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6 * * * |
+| `jd_petTreasureBox` | 宠汪汪聚宝盆 | 长期 | / | / | / |
+| `jd_pigPet` | 京东金融-养猪猪 | 长期 | / | 0-12/3 */3 * * * | 3 1 * * * |
+| `jd_plantBean` | 种豆得豆 | 长期 | 0 23,0-14/1 * * * | 0-12/3 */3 * * * | 3 */1 * * * |
+| `jd_rankingList` | 京东排行榜 | 长期 | 11 18 * * * | 0 0 */1 * * | 30 7 * * * |
+| `jd_redPacket` | 全民开红包 | 长期 | 0 17 * * * | 0 1 */1 * * | 10 0 * * * |
+| `jd_shop` | 进店领豆 | 长期 | 0 16 * * * | 0 0 */1 * * | 10 0 * * * |
+| `jd_small_home` | 东东小窝 | 长期 | / | 0 0,6,20 */1 * * | 10 0 * * * |
+| `jd_speed` | 天天加速 | 长期 | 33 */3 * * * | 0-12/3 */3 * * * | 8 */3 * * * |
+| `jd_superMarket` | 东东超市 | 长期 | 15 * * * * | */30 * * * * | 15 * * * * |
+| `jd_syj` | 十元街 | 长期 | / | 0 1 */1 * * | 3 1 * * * |
+| `jd_unbind` | 注销京东会员卡 | 长期 | / | / | 10 0 * * * |
+| `jd_unsubscribe` | 取关京东店铺和商品 | 长期 | 45 15 * * * | 0 1 */1 * * | 10 0 * * * |
+| `jd_watch` | 发现-看一看 | 长期 | / | / | 3 1 * * * |
+| `jr_sign` | 金融打卡年终奖 | 短期 | / | / | 3 1 * * * |
+| `jd_818` | 京东手机狂欢城 | 短期 | 0 1,4,7,10,12,16,22 * * * | 0 9,12,15,16,20,0,6 */1 * * | / |
+| `jd_apple_live` | 苹果抽奖机 | 短期 | / | / | / |
+| `jd_collectProduceScore` | 双十一活动领金币 | 短期 | 30 * * * * | */30 * * * * | / |
+| `jd_digital_floor` | 数码加购京豆 | 短期 | / | / | / |
+| `jd_jxstory` | 京喜故事 | 短期 | / | / | / |
+| `jd_mohe` | 热8超级魔盒 | 短期 | / | / | / |
+| `jd_pubg` | PUBG | 短期 | / | / | / |
+| `jd_split` | 金榜年终奖 | 短期 | / | / | / |
+| `jd_xtg` | 双十一星推官 | 短期 | 0 16 * * * | 0 0 */1 * * | / |
+
+点击提交,所有流程就结束了。
diff --git a/backUp/iOS_Weather_AQI_Standard.js b/backUp/iOS_Weather_AQI_Standard.js
new file mode 100644
index 00000000..dfb22941
--- /dev/null
+++ b/backUp/iOS_Weather_AQI_Standard.js
@@ -0,0 +1,138 @@
+// Developed by Hackl0us (https://github.com/hackl0us)
+
+// STEP 1: 前往 https://aqicn.org/data-platform/token/ 注册账户,将申请的 API Token 填入下方
+let aqicnToken = ''
+// STEP 2: 参考下方配置片段,在代理工具的配置文件中添加对应的配置。注意:script-path 后应该替换为添加 apicnToken 值后的脚本路径
+/*
+===============Surge=================
+[Script]
+AQI-US = type=http-response, pattern=https://weather-data.apple.com/v1/weather/[\w-]+/[0-9]+\.[0-9]+/[0-9]+\.[0-9]+\?, requires-body=true, script-path=/path/to/iOS_Weather_AQI_Standard.js
+
+[MITM]
+hostname = weather-data.apple.com
+*/
+const $ = new Env('牛逼天气');
+aqicnToken = $.getdata('hackl0us_aqi_token');
+
+const AirQualityStandard = {
+ CN: 'HJ6332012.1',
+ US: 'EPA_NowCast.1'
+}
+
+const AirQualityLevel = {
+ GOOD: 1,
+ MODERATE: 2,
+ UNHEALTHY_FOR_SENSITIVE: 3,
+ UNHEALTHY: 4,
+ VERY_UNHEALTHY: 5,
+ HAZARDOUS: 6
+}
+
+const coordRegex = /https:\/\/weather-data\.apple\.com\/v1\/weather\/[\w-]+\/([0-9]+\.[0-9]+)\/([0-9]+\.[0-9]+)\?/
+const [_, lat, lng] = $request.url.match(coordRegex)
+
+function classifyAirQualityLevel(aqiIndex) {
+ if (aqiIndex >= 0 && aqiIndex <= 50) {
+ return AirQualityLevel.GOOD;
+ } else if (aqiIndex >= 51 && aqiIndex <= 100) {
+ return AirQualityLevel.MODERATE;
+ } else if (aqiIndex >= 101 && aqiIndex <= 150) {
+ return AirQualityLevel.UNHEALTHY_FOR_SENSITIVE;
+ } else if (aqiIndex >= 151 && aqiIndex <= 200) {
+ return AirQualityLevel.UNHEALTHY;
+ } else if (aqiIndex >= 201 && aqiIndex <= 300) {
+ return AirQualityLevel.VERY_UNHEALTHY;
+ } else if (aqiIndex >= 301 && aqiIndex <= 500) {
+ return AirQualityLevel.HAZARDOUS;
+ }
+}
+
+function modifyWeatherResp(weatherRespBody, aqicnRespBody) {
+ let weatherRespJson = JSON.parse(weatherRespBody)
+ let aqicnRespJson = JSON.parse(aqicnRespBody).data
+ weatherRespJson.air_quality = constructAirQuailityNode(aqicnRespJson)
+ return JSON.stringify(weatherRespJson)
+}
+
+function getPrimaryPollutant(pollutant) {
+ switch (pollutant) {
+ case 'co':
+ return 'CO2';
+ case 'so2':
+ return 'SO2';
+ case 'no2':
+ return 'NO2';
+ case 'pm25':
+ return 'PM2.5';
+ case 'pm10':
+ return 'PM10';
+ case 'o3':
+ return 'OZONE';
+ default:
+ console.log('Unknown pollutant ' + pollutant);
+ }
+}
+
+function constructAirQuailityNode(aqicnData) {
+ let airQualityNode = { "source": "", "learnMoreURL": "", "isSignificant": true, "airQualityCategoryIndex": 1, "airQualityScale": "", "airQualityIndex": 0, "pollutants": { "CO": { "name": "CO", "amount": 0, "unit": "μg/m3" }, "SO2": { "name": "SO2", "amount": 0, "unit": "μg/m3" }, "NO2": { "name": "NO2", "amount": 0, "unit": "μg/m3" }, "PM2.5": { "name": "PM2.5", "amount": 0, "unit": "μg/m3" }, "OZONE": { "name": "OZONE", "amount": 0, "unit": "μg/m3" }, "PM10": { "name": "PM10", "amount": 0, "unit": "μg/m3" } }, "metadata": { "reported_time": 0, "longitude": 0, "provider_name": "aqicn.org", "expire_time": 2, "provider_logo": "https://i.loli.net/2020/12/27/UqW23eZLFAIbxGV.png", "read_time": 2, "latitude": 0, "v": 1, "language": "", "data_source": 0 }, "name": "AirQuality", "primaryPollutant": "" }
+ const aqicnIndex = aqicnData.aqi
+ airQualityNode.source = aqicnData.city.name
+ airQualityNode.learnMoreURL = aqicnData.city.url + '/cn/m'
+ airQualityNode.airQualityCategoryIndex = classifyAirQualityLevel(aqicnIndex)
+ airQualityNode.airQualityScale = AirQualityStandard.US
+ airQualityNode.airQualityIndex = aqicnIndex
+ airQualityNode.pollutants.CO.amount = aqicnData.iaqi.co?.v || -1
+ airQualityNode.pollutants.SO2.amount = aqicnData.iaqi.so2?.v || -1
+ airQualityNode.pollutants.NO2.amount = aqicnData.iaqi.no2?.v || -1
+ airQualityNode.pollutants["PM2.5"].amount = aqicnData.iaqi.pm25?.v || -1
+ airQualityNode.pollutants.OZONE.amount = aqicnData.iaqi.o3?.v || -1
+ airQualityNode.pollutants.PM10.amount = aqicnData.iaqi.pm10?.v || -1
+ airQualityNode.metadata.latitude = aqicnData.city.geo[0]
+ airQualityNode.metadata.longitude = aqicnData.city.geo[1]
+ airQualityNode.metadata.read_time = roundHours(new Date(), 'down')
+ airQualityNode.metadata.expire_time = roundHours(new Date(), 'up')
+ airQualityNode.metadata.reported_time = aqicnData.time.v
+ //airQualityNode.metadata.language = $request.headers['Accept-Language']
+ airQualityNode.primaryPollutant = getPrimaryPollutant(aqicnData.dominentpol)
+ return airQualityNode
+}
+
+function roundHours(time, method) {
+ switch (method) {
+ case 'up':
+ time.setHours(time.getHours() + Math.ceil(time.getMinutes() / 60));
+ break;
+ case 'down':
+ time.setHours(time.getHours() + Math.floor(time.getMinutes() / 60));
+ break;
+ default:
+ console.log("Error rounding method");
+ }
+ time.setMinutes(2, 0, 0);
+ return time;
+}
+
+// $httpClient.get(`https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, function (error, _response, data) {
+// if (error) {
+// let body = $response.body
+// $done({ body })
+// } else {
+// let body = modifyWeatherResp($response.body, data)
+// $done({ body })
+// }
+// });
+$.get({ url: `https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, headers: $request.headers },(err, resp, data) => {
+ try {
+ if (err) {
+ $.logErr(err, resp);
+ } else {
+ console.log(`${JSON.stringify(resp.body)}`);
+ let body = modifyWeatherResp($response.body, resp.body);
+ $.done({body});
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ $.done();
+ }
+});
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
\ No newline at end of file
diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md
new file mode 100644
index 00000000..30c04ca2
--- /dev/null
+++ b/backUp/tencentscf.md
@@ -0,0 +1,128 @@
+
+# 云函数快速部署京东脚本
+>
+> - 本地安装依赖使用serverless部署,[点这里](tencentscf.md#1-安装-nodejs-环境)
+> - Github Action 部署[点这里](tencentscf.md#github-action-部署)
+
+## 1. 安装 Node.js 环境
+
+Node.js 环境 [下载地址](https://nodejs.org/zh-tw/download/) ,根据自己的操作系统下载和安装。
+
+## 2. 下载代码
+
+点击红框处下载压缩包
+
+
+## 3. 安装依赖,配置 cookie
+
+### 3.1 安装依赖
+
+压缩包解压后进入项目文件夹
+
+- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口**
+- Mac 用户通过终端,自行进入该文件夹
+
+在命令行内输入 `npm i `,等待运行完成。
+
+此时,项目文件夹内会多出一个 `node_modules`文件夹
+
+### 3.2 配置 cookie
+
+打开项目文件内的 `jdCookie.js`
+
+在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔
+
+例如
+
+```javascript
+let CookieJDs = [
+ 'pt_key=xxx;pt_pin=xxx;',
+ 'pt_key=zzz;pt_pin=zzz;',
+ 'pt_key=aaa;pt_pin=xxxaaa'
+]
+```
+
+> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md)
+
+
+## 4. 部署到云函数
+
+### 4.1 开通服务
+
+依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
+
+> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
+
+### 4.2 工具部署
+
+下载 Serverless 工具,快速部署函数
+```
+npm install -g serverless
+```
+
+执行部署命令
+```
+serverless deploy
+```
+
+如果已经配置了永久秘钥,则可以直接部署,如果没有,可以直接**微信扫码**登录腾讯云,并且授权部署。
+
+过几秒后,查看输出,可以看到函数和定时触发器都已经配置完成。
+```
+serverless ⚡framework
+Action: "deploy" - Stage: "dev" - App: "jdscript" - Instance: "jdscript"
+
+functionName: scf-jdscript
+description: This is a function in jdscript application.
+namespace: default
+runtime: Nodejs12.16
+handler: index.main_handler
+memorySize: 64
+lastVersion: $LATEST
+traffic: 1
+triggers:
+ timer:
+ - timer-jdscript-dev
+
+36s › jdscript › Success
+```
+
+## 5. 查看和测试
+
+登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
+
+在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
+
+
+
+> 如果需要配置永久秘钥,则可以在[访问秘钥页面](https://console.cloud.tencent.com/cam/capi)获取账号的 TENCENT_SECRET_ID,TENCENT_SECRET_KEY,并配置在代码根目录 .env 文件中。
+
+
+# Github Action 部署
+## 1. 开通服务
+
+依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole**
+
+> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。
+
+## 2. 在这里新建一个访问密钥[新建密钥](https://console.cloud.tencent.com/cam/capi)
+> 将SecretId和SecretKey分别配置在仓库的secrets变量里面, TENCENT_SECRET_ID对应你的SecretId的值,TENCENT_SECRET_KEY对应你的SecretKey的值
+
+## 3. 配置自己需要secrets变量[参考这里](githubAction.md#下方提供使用到的-secrets全集合)
+### __重要的说三遍__
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接
+> 排查问题第一步先看自己[腾讯云函数](https://console.cloud.tencent.com/scf/list-detail?rid=5&ns=default&id=scf-jdscript)那边的环境变量跟自己在仓库配置的 `secrets` 是否一致
+
+
+
+## 4.执行action workflow进行部署,workflow未报错即部署成功
+
+## 5. 查看和测试
+登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。
+
+在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。
+
+
+## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4)
diff --git a/docker/Readme.md b/docker/Readme.md
index beb03302..922a84a7 100644
--- a/docker/Readme.md
+++ b/docker/Readme.md
@@ -1,4 +1,24 @@
### Usage
+```diff
++ 2021-01-03更新 增加 CUSTOM_SHELL_FILE 参数配置执行自定义shell脚本
++ 例1:配置远程shell脚本, 我自己写了一个shell脚本https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh 内容很简单下载惊喜农场并添加定时任务
++ CUSTOM_SHELL_FILE=https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh
++
++ 例2:配置docker挂载本地自定义shell脚本,/scripts/docker/shell_script_mod.sh 为你在docker-compose.yml里面挂载到容器里面绝对路径
++ CUSTOM_SHELL_FILE=/scripts/docker/shell_script_mod.sh
++
++ tip:如果使用远程自定义,请保证网络畅通或者选择合适的国内仓库,例如有部分人的容器里面就下载不到github的raw文件,那就可以把自己的自定义shell写在gitee上,或者换本地挂载
++ 如果是 docker 挂载本地,请保重文件挂载进去了,并且配置的是绝对路径。
++ 自定义 shell 脚本里面如果要加 crontab 任务请使用 echo 追加到 /scripts/docker/merged_list_file.sh 里面否者不生效
++ 注⚠️ 建议无shell能力的不要轻易使用,当然你可以找别人写好适配了这个docker镜像的脚本直接远程配置
++ 上面写了这么多如果还看不懂,不建议使用该变量功能。
+_____
+! ⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用
+! 更新后`command:`指令配置不再需要
+! 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择
+! - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字
+! 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新
+```
> 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式
- `docker-compose` 安装(群晖nas docker自带安装了docker-compose)
@@ -21,12 +41,6 @@ pip install docker-compose
### 如果需要使用 docker 多个账户独立并发执行定时任务,[参考这里](https://github.com/iouAkira/scripts/blob/patch-1/docker/docker%E5%A4%9A%E8%B4%A6%E6%88%B7%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E5%AE%B9%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md#%E4%BD%BF%E7%94%A8%E6%AD%A4%E6%96%B9%E5%BC%8F%E8%AF%B7%E5%85%88%E7%90%86%E8%A7%A3%E5%AD%A6%E4%BC%9A%E4%BD%BF%E7%94%A8docker%E5%8A%9E%E6%B3%95%E4%B8%80%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F)
-⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用
-- 更新后`command:`指令配置不再需要
-- 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择
-- - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字
-- 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新
-
> 注⚠️:前提先理解学会使用这下面的教程
### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可
需要新建的目录文件结构参考如下:
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 046099de..4dbf59b8 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -4,19 +4,8 @@
50 23 */3 * * rm -rf /scripts/logs/*.log
##############短期活动##############
-# 秒杀红包雨(2020.12.31活动过期)
-40 8 1-31 12 * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
# 健康抽奖机(2020.12.31活动过期)
-10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
-# 直播红包雨(2020.12.31活动过期)
-1 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
-# 京东健康APP集汪汪卡瓜分百万红包(2021.1.6活动过期)
-10 8 * * * node /scripts/jd_jdh.js >> /scripts/logs/jd_jdh.log 2>&1
-# crazyJoy自动每日任务
-10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1
-
+10 0 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
##############长期活动##############
# 签到
0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
@@ -71,11 +60,11 @@
# 十元街
36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
# 京东代属(注:限校园用户可使用)
-36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1
+# 36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1
# 京东快递签到
23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1
# 京东汽车(签到满500赛点可兑换500京豆)
-33 2 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1
+0 0 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1
# 领京豆额外奖励(每日可获得3京豆)
33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1
# 京东直播(每日18豆)
@@ -84,7 +73,7 @@
10 11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1
# 宠汪汪邀请助力
10 10,11 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1
-# 京东发现-看一看,看40个视频领80京豆(非常耗时)
-13 11,14 * * * node /scripts/jd_watch.js >> /scripts/logs/jd_watch.log 2>&1
# 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销
44 4 * * 6 node /scripts/jd_unbind.js >> /scripts/logs/jd_unbind.log 2>&1
+# crazyJoy自动每日任务
+10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1
diff --git a/docker/default_task.sh b/docker/default_task.sh
index caf4f6d1..26da7f0f 100644
--- a/docker/default_task.sh
+++ b/docker/default_task.sh
@@ -107,7 +107,7 @@ if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then
echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile
fi
-if [ $RANDOM_DELAY_MAX ];then
+if [ $RANDOM_DELAY_MAX ]; then
if [ $RANDOM_DELAY_MAX -ge 1 ]; then
echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... "
sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile
@@ -116,6 +116,27 @@ else
echo "未配置随即延迟对应的环境变量,故不设置延迟任务"
fi
+##增加自定义shell脚本
+if [ 0"$CUSTOM_SHELL_FILE" = "0" ]; then
+ echo "未配置自定shell脚本文件,跳过执行。"
+else
+ if expr "$CUSTOM_SHELL_FILE" : 'http.*' &>/dev/null; then
+ echo "自定义shell脚本为远程脚本,开始下在自定义远程脚本。"
+ wget -O /scripts/docker/shell_script_mod.sh $CUSTOM_SHELL_FILE
+ echo "下载完成,开始执行..."
+ sh -x /scripts/docker/shell_script_mod.sh
+ echo "自定义远程shell脚本下载并执行结束。"
+ else
+ if [ !$CUSTOM_SHELL_FILE ]; then
+ echo "自定义shell脚本为docker挂载脚本文件,但是指定挂载文件不存在,跳过执行。"
+ else
+ echo "docker挂载的自定shell脚本,开始执行..."
+ sh -x $CUSTOM_SHELL_FILE
+ echo "docker挂载的自定shell脚本,执行结束。"
+ fi
+ fi
+fi
+
echo "加载最新的定时任务文件..."
crontab $mergedListFile
diff --git a/jdCookie.js b/jdCookie.js
index 4eb2bb76..0dcadb23 100644
--- a/jdCookie.js
+++ b/jdCookie.js
@@ -15,19 +15,14 @@ if (process.env.JD_COOKIE) {
} else if (process.env.JD_COOKIE.indexOf('\n') > -1) {
console.log(`您的cookie选择的是用换行隔开\n`)
CookieJDs = process.env.JD_COOKIE.split('\n');
- } else if (process.env.JD_COOKIE.indexOf('\\n') > -1) {
- //环境变量兼容腾讯云和docker下\n会被转义成\\n
- console.log(`您的cookie选择的是用换行隔开\\n`)
- CookieJDs = process.env.JD_COOKIE.split('\\n');
} else {
CookieJDs = [process.env.JD_COOKIE];
}
- CookieJDs = [...new Set(CookieJDs)]
- console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`);
- console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
- // console.log(`\n==================脚本执行来自 github action=====================\n`)
}
+CookieJDs = [...new Set(CookieJDs.filter(item => item !== "" && item !== null && item !== undefined))]
+console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`);
+console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`)
for (let i = 0; i < CookieJDs.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
- exports['CookieJD' + index] = CookieJDs[i];
+ exports['CookieJD' + index] = CookieJDs[i].trim();
}
diff --git a/jd_bean_home.js b/jd_bean_home.js
index 7a84357b..666ad746 100644
--- a/jd_bean_home.js
+++ b/jd_bean_home.js
@@ -112,11 +112,15 @@ const JD_API_HOST = 'https://api.m.jd.com/';
async function jdBeanHome() {
$.doneState = false
- for (let i = 0; i < 3; ++i) {
+ // for (let i = 0; i < 3; ++i) {
+ // await doTask2()
+ // await $.wait(1000)
+ // if ($.doneState) break
+ // }
+ do {
await doTask2()
- await $.wait(1000)
- if ($.doneState) break
- }
+ await $.wait(3000)
+ } while (!$.doneState)
await $.wait(1000)
await award("feeds")
await $.wait(1000)
@@ -142,10 +146,16 @@ function doTask2() {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
- if(data.code === '0' && data.data){
+ if (data.code === '0' && data.data){
console.log(`任务完成进度:${data.data.taskProgress} / ${data.data.taskThreshold}`)
- if(data.data.taskProgress===data.data.taskThreshold)
+ if(data.data.taskProgress === data.data.taskThreshold)
$.doneState = true
+ } else if (data.code === '0' && data.errorCode === 'HT201') {
+ $.doneState = true
+ } else {
+ //HT304风控用户
+ $.doneState = true
+ console.log(`做任务异常:${JSON.stringify(data)}`)
}
}
}
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index accf5990..fb3fee0e 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -1,7 +1,7 @@
/*
京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
Node.JS专用
-更新时间:2020-12-21
+更新时间:2021-1-4
从 github @ruicky改写而来
version v0.0.1
create by ruicky
@@ -17,6 +17,7 @@ const download = require('download');
let resultPath = "./result.txt";
let JD_DailyBonusPath = "./JD_DailyBonus.js";
let outPutUrl = './';
+let NodeSet = 'CookieSet.json';
let cookiesArr = [], cookie = '';
if ($.isNode()) {
@@ -130,6 +131,7 @@ async function downFile () {
async function changeFile (content) {
console.log(`开始替换变量`)
let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`);
+ newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`)
if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') {
newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`);
}
@@ -219,6 +221,7 @@ function requireConfig() {
resultPath = err ? '/tmp/result.txt' : resultPath;
JD_DailyBonusPath = err ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath;
outPutUrl = err ? '/tmp/' : outPutUrl;
+ NodeSet = err ? '/tmp/CookieSet.json' : NodeSet;
resolve()
});
})
diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js
index a87e8711..f1d1f5d9 100644
--- a/jd_crazy_joy.js
+++ b/jd_crazy_joy.js
@@ -666,7 +666,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js
index 4e4a5a3b..8824b85a 100644
--- a/jd_crazy_joy_coin.js
+++ b/jd_crazy_joy_coin.js
@@ -204,6 +204,12 @@ async function jdJxStory() {
await $.wait(1000)
await getJoyShop()
await $.wait(1000)
+ if ($.joyIds && $.joyIds.length > 0) {
+ $.log('当前JOY分布情况')
+ $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`)
+ $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`)
+ $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`)
+ }
for (let i = 0; i < $.joyIds.length; ++i) {
if (!$.canBuy) {
$.log(`金币不足,跳过购买`)
@@ -280,8 +286,14 @@ function getJoyShop() {
data = JSON.parse(data);
if (data.success && data.data && data.data.shop) {
const shop = data.data.shop.filter(vo => vo.status === 1) || []
- $.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1
- $.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity
+ $.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1;//可购买的最大等级
+ if ($.isNode() && process.env.BUY_JOY_LEVEL) {
+ $.log(`当前可购买的最高JOY等级为${$.buyJoyLevel}级\n`)
+ $.buyJoyLevel = (process.env.BUY_JOY_LEVEL * 1) > $.buyJoyLevel ? $.buyJoyLevel : process.env.BUY_JOY_LEVEL * 1;
+ $.cost = shop[$.buyJoyLevel - 1]['coins']
+ } else {
+ $.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity
+ }
}
}
} catch (e) {
diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js
index 2333f2f8..713a46f9 100644
--- a/jd_dreamFactory.js
+++ b/jd_dreamFactory.js
@@ -34,7 +34,7 @@ const randomCount = $.isNode() ? 20 : 5;
let tuanActiveId = `6S9y4sJUfA2vPQP6TLdVIQ==`;
const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`;
let cookiesArr = [], cookie = '', message = '';
-const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg=='];
+const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@0WtCMPNq7jekehT6d3AbFw==', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg=='];
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
@@ -1305,7 +1305,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_fruit.js b/jd_fruit.js
index 03185eb1..0b4b3ba2 100644
--- a/jd_fruit.js
+++ b/jd_fruit.js
@@ -1,6 +1,6 @@
/*
东东水果:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js
-更新时间:2020-12-25
+更新时间:2021-1-5
东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -29,9 +29,9 @@ let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, n
//下面给出两个账号的填写示例(iOS只支持2个京东账号)
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
//账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
- '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',
+ '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a@',
//账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
- 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',
+ 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3@2673c3777d4443829b2a635059953a28',
]
let message = '', subTitle = '', option = {}, isFruitFinished = false;
const retainWater = 100;//保留水滴大于多少g,默认100g;
@@ -771,24 +771,31 @@ async function clockInIn() {
//
async function getAwardInviteFriend() {
await friendListInitForFarm();//查询好友列表
- console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`);
- console.log(`开始删除${$.friendList.friends.length}个好友,可拿每天的邀请奖励`);
- for (let friend of $.friendList.friends) {
- console.log(`\n开始删除好友 [${friend.shareCode}]`);
- const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
- if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
- console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ console.log(`查询好友列表数据:${JSON.stringify($.friendList)}\n`)
+ if ($.friendList) {
+ console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`);
+ console.log(`开始删除${$.friendList.friends && $.friendList.friends.length}个好友,可拿每天的邀请奖励`);
+ if ($.friendList.friends && $.friendList.friends.length > 0) {
+ for (let friend of $.friendList.friends) {
+ console.log(`\n开始删除好友 [${friend.shareCode}]`);
+ const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 });
+ if (deleteFriendForFarm && deleteFriendForFarm.code === '0') {
+ console.log(`删除好友 [${friend.shareCode}] 成功\n`);
+ }
+ }
}
- }
- await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友
- if ($.friendList.inviteFriendCount > 0) {
- if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) {
- console.log('开始领取邀请好友的奖励');
- await awardInviteFriendForFarm();
- console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`);
+ await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友
+ if ($.friendList.inviteFriendCount > 0) {
+ if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) {
+ console.log('开始领取邀请好友的奖励');
+ await awardInviteFriendForFarm();
+ console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`);
+ }
+ } else {
+ console.log('今日未邀请过好友')
}
} else {
- console.log('今日未邀请过好友')
+ console.log(`查询好友列表失败\n`);
}
}
//给好友浇水
@@ -1239,7 +1246,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_get_share_code.js b/jd_get_share_code.js
new file mode 100644
index 00000000..5b44c5cb
--- /dev/null
+++ b/jd_get_share_code.js
@@ -0,0 +1,665 @@
+const $ = new Env("获取互助码");
+const JD_API_HOST = "https://api.m.jd.com/client.action";
+let cookiesArr = [], cookie = '', message;
+const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
+!function (n) {
+ "use strict";
+
+ function t(n, t) {
+ var r = (65535 & n) + (65535 & t);
+ return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r
+ }
+
+ function r(n, t) {
+ return n << t | n >>> 32 - t
+ }
+
+ function e(n, e, o, u, c, f) {
+ return t(r(t(t(e, n), t(u, f)), c), o)
+ }
+
+ function o(n, t, r, o, u, c, f) {
+ return e(t & r | ~t & o, n, t, u, c, f)
+ }
+
+ function u(n, t, r, o, u, c, f) {
+ return e(t & o | r & ~o, n, t, u, c, f)
+ }
+
+ function c(n, t, r, o, u, c, f) {
+ return e(t ^ r ^ o, n, t, u, c, f)
+ }
+
+ function f(n, t, r, o, u, c, f) {
+ return e(r ^ (t | ~o), n, t, u, c, f)
+ }
+
+ function i(n, r) {
+ n[r >> 5] |= 128 << r % 32,
+ n[14 + (r + 64 >>> 9 << 4)] = r;
+ var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878;
+ for (e = 0; e < n.length; e += 16)
+ i = l,
+ a = g,
+ d = v,
+ h = m,
+ g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551),
+ l = t(l, i),
+ g = t(g, a),
+ v = t(v, d),
+ m = t(m, h);
+ return [l, g, v, m]
+ }
+
+ function a(n) {
+ var t, r = "", e = 32 * n.length;
+ for (t = 0; t < e; t += 8)
+ r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255);
+ return r
+ }
+
+ function d(n) {
+ var t, r = [];
+ for (r[(n.length >> 2) - 1] = void 0,
+ t = 0; t < r.length; t += 1)
+ r[t] = 0;
+ var e = 8 * n.length;
+ for (t = 0; t < e; t += 8)
+ r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32;
+ return r
+ }
+
+ function h(n) {
+ return a(i(d(n), 8 * n.length))
+ }
+
+ function l(n, t) {
+ var r, e, o = d(n), u = [], c = [];
+ for (u[15] = c[15] = void 0,
+ o.length > 16 && (o = i(o, 8 * n.length)),
+ r = 0; r < 16; r += 1)
+ u[r] = 909522486 ^ o[r],
+ c[r] = 1549556828 ^ o[r];
+ return e = i(u.concat(d(t)), 512 + 8 * t.length),
+ a(i(c.concat(e), 640))
+ }
+
+ function g(n) {
+ var t, r, e = "";
+ for (r = 0; r < n.length; r += 1)
+ t = n.charCodeAt(r),
+ e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t);
+ return e
+ }
+
+ function v(n) {
+ return unescape(encodeURIComponent(n))
+ }
+
+ function m(n) {
+ return h(v(n))
+ }
+
+ function p(n) {
+ return g(m(n))
+ }
+
+ function s(n, t) {
+ return l(v(n), v(t))
+ }
+
+ function C(n, t) {
+ return g(s(n, t))
+ }
+
+ function A(n, t, r) {
+ return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n)
+ }
+
+ $.md5 = A
+}(this);
+if ($.isNode()) {
+ Object.keys(jdCookieNode).forEach((item) => {
+ cookiesArr.push(jdCookieNode[item])
+ })
+ if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
+} else {
+ let cookiesData = $.getdata('CookiesJD') || "[]";
+ cookiesData = jsonParse(cookiesData);
+ cookiesArr = cookiesData.map(item => item.cookie);
+ cookiesArr.reverse();
+ cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
+ cookiesArr.reverse();
+}
+!(async () => {
+ if (!cookiesArr[0]) {
+ $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
+ return;
+ }
+ for (let i = 0; i < cookiesArr.length; i++) {
+ if (cookiesArr[i]) {
+ cookie = cookiesArr[i];
+ $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
+ $.index = i + 1;
+ $.isLogin = true;
+ $.nickName = '';
+ message = '';
+ await TotalBean();
+ if (!$.isLogin) {
+ continue
+ }
+ console.log(`======账号${$.index}开始======`)
+ await getShareCode()
+ console.log(`======账号${$.index}结束======\n`)
+ }
+ }
+})()
+ .catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+ })
+ .finally(() => {
+ $.done();
+ })
+function getJdFactory() {
+ return new Promise(resolve => {
+ $.post(
+ taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"),
+ async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`);
+ console.log(`$东东工厂 API请求失败,请检查网路重试`);
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.data.bizCode === 0) {
+ $.taskVos = data.data.result.taskVos; //任务列表
+ $.taskVos.map((item) => {
+ if (item.taskType === 14) {
+ console.log(
+ `【账号${$.index}(${$.nickName || $.UserName})东东工厂】${item.assistTaskDetailVo.taskToken}`
+ );
+ }
+ });
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve();
+ }
+ }
+ );
+ })
+}
+function getJxFactory(){
+ const JX_API_HOST = "https://m.jingxi.com";
+
+ function JXGC_taskurl(functionId, body = "") {
+ return {
+ url: `${JX_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now()}`,
+ headers: {
+ Cookie: cookie,
+ Host: "m.jingxi.com",
+ Accept: "*/*",
+ Connection: "keep-alive",
+ "User-Agent":
+ "jdpingou;iPhone;3.14.4;14.0;ae75259f6ca8378672006fc41079cd8c90c53be8;network/wifi;model/iPhone10,2;appBuild/100351;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/62;pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
+ "Accept-Language": "zh-cn",
+ Referer: "https://wqsd.jd.com/pingou/dream_factory/index.html",
+ "Accept-Encoding": "gzip, deflate, br",
+ },
+ };
+ }
+
+ return new Promise(resolve => {
+ $.get(
+ JXGC_taskurl(
+ "userinfo/GetUserInfo",
+ `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=`
+ ),
+ async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`);
+ console.log(`惊喜工厂 API请求失败,请检查网路重试`);
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data["ret"] === 0) {
+ data = data["data"];
+ $.unActive = true; //标记是否开启了京喜活动或者选购了商品进行生产
+ $.encryptPin = "";
+ $.shelvesList = [];
+ if (data.factoryList && data.productionList) {
+ const production = data.productionList[0];
+ const factory = data.factoryList[0];
+ const productionStage = data.productionStage;
+ $.factoryId = factory.factoryId; //工厂ID
+ $.productionId = production.productionId; //商品ID
+ $.commodityDimId = production.commodityDimId;
+ $.encryptPin = data.user.encryptPin;
+ // subTitle = data.user.pin;
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})惊喜工厂】${data.user.encryptPin}`);
+ }
+ } else {
+ $.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产
+ if (!data.factoryList) {
+ console.log(
+ `【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`
+ );
+ } else if (data.factoryList && !data.productionList) {
+ console.log(
+ `【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购`
+ );
+ }
+ }
+ } else {
+ console.log(`GetUserInfo异常:${JSON.stringify(data)}`);
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve()
+ }
+ }
+ );
+ })
+}
+function getJdPet(){
+ const JDPet_API_HOST = "https://api.m.jd.com/client.action";
+
+ function jdPet_Url(function_id, body = {}) {
+ body["version"] = 2;
+ body["channel"] = "app";
+ return {
+ url: `${JDPet_API_HOST}?functionId=${function_id}`,
+ body: `body=${escape(
+ JSON.stringify(body)
+ )}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`,
+ headers: {
+ Cookie: cookie,
+ "User-Agent": $.isNode()
+ ? process.env.JD_USER_AGENT
+ ? process.env.JD_USER_AGENT
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"
+ : $.getdata("JDUA")
+ ? $.getdata("JDUA")
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0",
+ Host: "api.m.jd.com",
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+ };
+ }
+ return new Promise(resolve => {
+ $.post(jdPet_Url("initPetTown"), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log("东东萌宠: API查询请求失败 ‼️‼️");
+ console.log(JSON.stringify(err));
+ $.logErr(err);
+ } else {
+ data = JSON.parse(data);
+
+ const initPetTownRes = data;
+
+ message = `【京东账号${$.index}】${$.nickName}`;
+ if (
+ initPetTownRes.code === "0" &&
+ initPetTownRes.resultCode === "0" &&
+ initPetTownRes.message === "success"
+ ) {
+ $.petInfo = initPetTownRes.result;
+ if ($.petInfo.userStatus === 0) {
+ /*console.log(
+ `【提示】京东账号${$.index}${$.nickName}萌宠活动未开启请手动去京东APP开启活动入口:我的->游戏与互动->查看更多开启`
+ );*/
+ return;
+ }
+
+ console.log(
+ `【账号${$.index}(${$.nickName || $.UserName})京东萌宠】${$.petInfo.shareCode}`
+ );
+
+ } else if (initPetTownRes.code === "0") {
+ console.log(`初始化萌宠失败: ${initPetTownRes.message}`);
+ } else {
+ console.log("shit");
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve(data);
+ }
+ });
+ })
+}
+async function getJdZZ() {
+ const JDZZ_API_HOST = "https://api.m.jd.com/client.action";
+
+ function getUserInfo() {
+ return new Promise(resolve => {
+ $.get(taskZZUrl("interactIndex"), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.data.shareTaskRes) {
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})京东赚赚】${data.data.shareTaskRes.itemId}`);
+ } else {
+ //console.log(`已满5人助力,暂时看不到您的京东赚赚好友助力码`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve(data);
+ }
+ })
+ })
+ }
+
+ function taskZZUrl(functionId, body = {}) {
+ return {
+ url: `${JDZZ_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`,
+ headers: {
+ 'Cookie': cookie,
+ 'Host': 'api.m.jd.com',
+ 'Connection': 'keep-alive',
+ 'Content-Type': 'application/json',
+ 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index',
+ 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ 'Accept-Language': 'zh-cn',
+ 'Accept-Encoding': 'gzip, deflate, br',
+ }
+ }
+ }
+
+ await getUserInfo()
+}
+async function getPlantBean() {
+ const JDplant_API_HOST = "https://api.m.jd.com/client.action";
+
+ async function plantBeanIndex() {
+ $.plantBeanIndexResult = await plant_request("plantBeanIndex"); //plantBeanIndexBody
+ }
+
+ function plant_request(function_id, body = {}) {
+ return new Promise(async (resolve) => {
+ $.post(plant_taskUrl(function_id, body), (err, resp, data) => {
+ try {
+ if (err) {
+ console.log("种豆得豆: API查询请求失败 ‼️‼️");
+ console.log(`function_id:${function_id}`);
+ $.logErr(err);
+ } else {
+ data = JSON.parse(data);
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve(data);
+ }
+ });
+ });
+ }
+
+ function plant_taskUrl(function_id, body) {
+ body["version"] = "9.0.0.1";
+ body["monitor_source"] = "plant_app_plant_index";
+ body["monitor_refer"] = "";
+ return {
+ url: JDplant_API_HOST,
+ body: `functionId=${function_id}&body=${escape(
+ JSON.stringify(body)
+ )}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`,
+ headers: {
+ Cookie: cookie,
+ Host: "api.m.jd.com",
+ Accept: "*/*",
+ Connection: "keep-alive",
+ "User-Agent": $.isNode()
+ ? process.env.JD_USER_AGENT
+ ? process.env.JD_USER_AGENT
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"
+ : $.getdata("JDUA")
+ ? $.getdata("JDUA")
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0",
+ "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+ };
+ }
+
+ function getParam(url, name) {
+ const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+ const r = url.match(reg);
+ if (r != null) return unescape(r[2]);
+ return null;
+ }
+
+ async function jdPlantBean() {
+ await plantBeanIndex();
+ // console.log(plantBeanIndexResult.data.taskList);
+ if ($.plantBeanIndexResult.code === "0") {
+ const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl;
+ $.myPlantUuid = getParam(shareUrl, "plantUuid");
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})种豆得豆】${$.myPlantUuid}`);
+
+ } else {
+ console.log(
+ `种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`
+ );
+ }
+ }
+
+ await jdPlantBean();
+}
+async function getJDFruit() {
+ async function initForFarm() {
+ return new Promise((resolve) => {
+ const option = {
+ url: `${JD_API_HOST}?functionId=initForFarm`,
+ body: `body=${escape(
+ JSON.stringify({version: 4})
+ )}&appid=wh5&clientVersion=9.1.0`,
+ headers: {
+ accept: "*/*",
+ "accept-encoding": "gzip, deflate, br",
+ "accept-language": "zh-CN,zh;q=0.9",
+ "cache-control": "no-cache",
+ cookie: cookie,
+ origin: "https://home.m.jd.com",
+ pragma: "no-cache",
+ referer: "https://home.m.jd.com/myJd/newhome.action",
+ "sec-fetch-dest": "empty",
+ "sec-fetch-mode": "cors",
+ "sec-fetch-site": "same-site",
+ "User-Agent": $.isNode()
+ ? process.env.JD_USER_AGENT
+ ? process.env.JD_USER_AGENT
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"
+ : $.getdata("JDUA")
+ ? $.getdata("JDUA")
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0",
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+ };
+ $.post(option, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log("东东农场: API查询请求失败 ‼️‼️");
+ console.log(JSON.stringify(err));
+ $.logErr(err);
+ } else {
+ if (safeGet(data)) {
+ $.farmInfo = JSON.parse(data);
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp);
+ } finally {
+ resolve();
+ }
+ });
+ });
+ }
+
+ async function jdFruit() {
+ await initForFarm();
+ if ($.farmInfo.farmUserPro) {
+ console.log(
+ `【账号${$.index}(${$.nickName || $.UserName})京东农场】${$.farmInfo.farmUserPro.shareCode}`
+ );
+
+ } else {
+ /*console.log(
+ `初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify(
+ $.farmInfo
+ )}`
+ );*/
+ }
+ }
+
+ await jdFruit();
+}
+async function getJoy(){
+ function taskUrl(functionId, body = '') {
+ let t = Date.now().toString().substr(0, 10)
+ let e = body || ""
+ e = $.md5("aDvScBv$gGQvrXfva8dG!ZC@DA70Y%lX" + e + t)
+ e = e + Number(t).toString(16)
+ return {
+ url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`,
+ headers: {
+ 'Cookie': cookie,
+ 'Host': 'api.m.jd.com',
+ 'Accept': '*/*',
+ 'Connection': 'keep-alive',
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
+ 'Accept-Language': 'zh-cn',
+ 'Referer': 'https://crazy-joy.jd.com/',
+ 'origin': 'https://crazy-joy.jd.com',
+ 'Accept-Encoding': 'gzip, deflate, br',
+ }
+ }
+ }
+ let body = {"paramData": {}}
+ return new Promise(async resolve => {
+ $.get(taskUrl('crazyJoy_user_gameState', JSON.stringify(body)), async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (safeGet(data)) {
+ data = JSON.parse(data);
+ if (data.success && data.data && data.data.userInviteCode) {
+ console.log(`【账号${$.index}(${$.nickName || $.UserName})crazyJoy】${data.data.userInviteCode}`)
+ }
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+async function getShareCode() {
+ await getJdFactory()
+ await getJxFactory()
+ await getJdPet()
+ await getPlantBean()
+ await getJDFruit()
+ await getJdZZ()
+ await getJoy()
+}
+
+function safeGet(data) {
+ try {
+ if (typeof JSON.parse(data) == "object") {
+ return true;
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
+ return false;
+ }
+}
+function TotalBean() {
+ return new Promise(async resolve => {
+ const options = {
+ "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
+ "headers": {
+ "Accept": "application/json,text/plain, */*",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "Accept-Encoding": "gzip, deflate, br",
+ "Accept-Language": "zh-cn",
+ "Connection": "keep-alive",
+ "Cookie": cookie,
+ "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
+ "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
+ }
+ }
+ $.post(options, (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} API请求失败,请检查网路重试`)
+ } else {
+ if (data) {
+ data = JSON.parse(data);
+ if (data['retcode'] === 13) {
+ $.isLogin = false; //cookie过期
+ return
+ }
+ $.nickName = data['base'].nickname;
+ } else {
+ console.log(`京东服务器返回空数据`)
+ }
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve();
+ }
+ })
+ })
+}
+function taskPostUrl(function_id, body = {}, function_id2) {
+ let url = `${JD_API_HOST}`;
+ if (function_id2) {
+ url += `?functionId=${function_id2}`;
+ }
+ return {
+ url,
+ body: `functionId=${function_id}&body=${escape(
+ JSON.stringify(body)
+ )}&client=wh5&clientVersion=9.1.0`,
+ headers: {
+ Cookie: cookie,
+ origin: "https://h5.m.jd.com",
+ referer: "https://h5.m.jd.com/",
+ "Content-Type": "application/x-www-form-urlencoded",
+ "User-Agent": $.isNode()
+ ? process.env.JD_USER_AGENT
+ ? process.env.JD_USER_AGENT
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"
+ : $.getdata("JDUA")
+ ? $.getdata("JDUA")
+ : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0",
+ },
+ };
+}
+// prettier-ignore
+function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
diff --git a/jd_health.js b/jd_health.js
index ee4ffe9b..b05005d0 100644
--- a/jd_health.js
+++ b/jd_health.js
@@ -265,7 +265,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_jdfactory.js b/jd_jdfactory.js
index 5f16249c..546b7109 100644
--- a/jd_jdfactory.js
+++ b/jd_jdfactory.js
@@ -108,8 +108,8 @@ function showMsg() {
} else {
$.log(`京东账号${$.index}${$.nickName}\n${message}`);
}
- if (new Date().getHours() === 23) {
- $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
+ if (new Date().getHours() === 12) {
+ $.msg($.name, '', `${message}`);
}
resolve()
})
@@ -181,6 +181,7 @@ async function algorithm() {
}
} else {
console.log(`\n此账号${$.index}${$.nickName}暂未选择商品\n`);
+ message += `京东账号${$.index} ${$.nickName}\n`;
message += `已选商品:暂无\n`;
message += `心仪商品:${wantProduct ? wantProduct : '暂无'}\n`;
if (wantProduct) {
@@ -216,17 +217,17 @@ async function algorithm() {
} else {
console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`);
await jdfactory_getProductList(true);
- message += `当前剩余最多商品:${$.canMakeList[0].name}\n`;
- message += `兑换所需电量:${$.canMakeList[0].fullScore}\n`;
+ message += `当前剩余最多商品:${$.canMakeList[0] && $.canMakeList[0].name}\n`;
+ message += `兑换所需电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n`;
message += `您当前总电量:${$.batteryValue * 1}\n`;
- if ($.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0].fullScore) {
+ if ($.canMakeList[0] && $.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0] && $.canMakeList[0].fullScore) {
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
if (new Date(nowTimes).getHours() === 12) {
- $.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'});
- if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
+ $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0] && [0].name}所需总电量:${$.canMakeList[0] && $.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'});
+ if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
}
} else {
- console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
+ console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0] && $.canMakeList[0].name}所需的 ${$.canMakeList[0] && $.canMakeList[0].fullScore}电量\n`)
}
}
}
@@ -355,7 +356,8 @@ async function doTask() {
//领取做完任务的奖励
function jdfactory_collectScore(taskToken) {
- return new Promise(resolve => {
+ return new Promise(async resolve => {
+ await $.wait(1000);
$.post(taskPostUrl("jdfactory_collectScore", { taskToken }, "jdfactory_collectScore"), async (err, resp, data) => {
try {
if (err) {
@@ -534,17 +536,20 @@ function jdfactory_getProductList(flag = false) {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.data.bizCode === 0) {
+ $.canMakeList = [];
$.canMakeList = data.data.result.canMakeList;//当前可选商品列表 sellOut:1为已抢光,0为目前可选择
- $.canMakeList.sort(sortCouponCount);
- console.log(`商品名称 可选状态 剩余量`)
- for (let item of $.canMakeList) {
- console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`);
- }
- if (!flag) {
+ if ($.canMakeList && $.canMakeList.length > 0) {
+ $.canMakeList.sort(sortCouponCount);
+ console.log(`商品名称 可选状态 剩余量`)
for (let item of $.canMakeList) {
- if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) {
- await jdfactory_makeProduct(item.skuId);
- break
+ console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`);
+ }
+ if (!flag) {
+ for (let item of $.canMakeList) {
+ if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) {
+ await jdfactory_makeProduct(item.skuId);
+ break
+ }
}
}
}
@@ -623,7 +628,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_jdzz.js b/jd_jdzz.js
index f5da3632..5ea61aa2 100644
--- a/jd_jdzz.js
+++ b/jd_jdzz.js
@@ -343,7 +343,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
+ console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index 6878e769..2eaf482d 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -60,6 +60,7 @@ const JD_API_HOST = 'https://jdjoy.jd.com';
}
continue
}
+ console.log(`本地时间与京东服务器时间差(毫秒):${await get_diff_time()}`);
await joyReward();
// $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@lxk0301`);
}
@@ -273,6 +274,35 @@ function TotalBean() {
})
})
}
+function getJDServerTime() {
+ return new Promise(resolve => {
+ // console.log(Date.now())
+ $.get({url: "https://a.jd.com//ajax/queryServerData.html",headers:{
+ "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
+ }}, async (err, resp, data) => {
+ try {
+ if (err) {
+ console.log(`${JSON.stringify(err)}`)
+ console.log(`${$.name} 获取京东服务器时间失败,请检查网路重试`)
+ } else {
+ data = JSON.parse(data);
+ $.jdTime = data['serverTime'];
+ // console.log(data['serverTime']);
+ // console.log(data['serverTime'] - Date.now())
+ }
+ } catch (e) {
+ $.logErr(e, resp)
+ } finally {
+ resolve($.jdTime);
+ }
+ })
+ })
+}
+async function get_diff_time() {
+ // console.log(`本机时间戳 ${Date.now()}`)
+ // console.log(`京东服务器时间戳 ${await getJDServerTime()}`)
+ return Date.now() - await getJDServerTime();
+}
function jsonParse(str) {
if (typeof str == "string") {
try {
diff --git a/jd_pet.js b/jd_pet.js
index 9b19c20f..cde3fd7f 100644
--- a/jd_pet.js
+++ b/jd_pet.js
@@ -442,7 +442,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_plantBean.js b/jd_plantBean.js
index 9497a079..c573903e 100644
--- a/jd_plantBean.js
+++ b/jd_plantBean.js
@@ -1,6 +1,6 @@
/*
种豆得豆 脚本更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js
-更新时间:2020-11-04
+更新时间:2020-12-31
已支持IOS京东双账号,云端N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
注:会自动关注任务中的店铺跟商品,介意者勿使用。
@@ -161,14 +161,27 @@ async function stealFriendWater() {
return
}
if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) {
+ let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
for (let item of $.stealFriendList.data.friendInfoList) {
- if (item.nutrCount >= 3) {
- // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
- console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
- await collectUserNutr(item.paradiseUuid);
- console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
- if ($.stealFriendRes.code === '0') {
- console.log(`偷取好友营养液成功`)
+ if (new Date(nowTimes).getHours() === 20) {
+ if (item.nutrCount >= 2) {
+ // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
+ console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
+ await collectUserNutr(item.paradiseUuid);
+ console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
+ if ($.stealFriendRes.code === '0') {
+ console.log(`偷取好友营养液成功`)
+ }
+ }
+ } else {
+ if (item.nutrCount >= 3) {
+ // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`);
+ console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`);
+ await collectUserNutr(item.paradiseUuid);
+ console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`)
+ if ($.stealFriendRes.code === '0') {
+ console.log(`偷取好友营养液成功`)
+ }
}
}
}
@@ -508,7 +521,7 @@ function readShareCode() {
console.log(`${$.name} API请求失败,请检查网路重试`)
} else {
if (data) {
- console.log(`随机取个${randomCount}码放到您固定的互助码后面`)
+ console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
data = JSON.parse(data);
}
}
diff --git a/jd_small_home.js b/jd_small_home.js
index 096519e6..46a21a0b 100644
--- a/jd_small_home.js
+++ b/jd_small_home.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-11-12 11:42:12
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-12-23 14:27:20
+ * @Last Modified time: 2021-1-4 14:27:20
*/
/*
东东小窝 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js
@@ -274,25 +274,27 @@ function queryFurnituresCenterList() {
if (safeGet(data)) {
data = JSON.parse(data);
if (data.head.code === 200) {
- let { buy, list } = data.body;
- $.canBuyList = [];
- list.map((item, index) => {
- if (buy.some((buyItem) => buyItem === item.id)) return
- $.canBuyList.push(item);
- })
- $.canBuyList.sort(sortByjdBeanNum);
- if ($.canBuyList[0].needWoB <= $.woB) {
- await furnituresCenterPurchase($.canBuyList[0].id, $.canBuyList[0].jdBeanNum);
- } else {
- console.log(`\n兑换${$.canBuyList[0].jdBeanNum}京豆失败:当前wo币${$.woB}不够兑换所需的${$.canBuyList[0].needWoB}WO币`)
- message += `【装饰领京豆】兑换${$.canBuyList[0].jdBeanNum}京豆失败,原因:WO币不够\n`;
+ if (data.body) {
+ let { buy, list } = data.body;
+ $.canBuyList = [];
+ list.map((item, index) => {
+ if (buy.some((buyItem) => buyItem === item.id)) return
+ $.canBuyList.push(item);
+ })
+ $.canBuyList.sort(sortByjdBeanNum);
+ if ($.canBuyList[0].needWoB <= $.woB) {
+ await furnituresCenterPurchase($.canBuyList[0].id, $.canBuyList[0].jdBeanNum);
+ } else {
+ console.log(`\n兑换${$.canBuyList[0].jdBeanNum}京豆失败:当前wo币${$.woB}不够兑换所需的${$.canBuyList[0].needWoB}WO币`)
+ message += `【装饰领京豆】兑换${$.canBuyList[0].jdBeanNum}京豆失败,原因:WO币不够\n`;
+ }
+ // for (let canBuyItem of $.canBuyList) {
+ // if (canBuyItem.needWoB <= $.woB) {
+ // await furnituresCenterPurchase(canBuyItem.id, canBuyItem.jdBeanNum);
+ // break
+ // }
+ // }
}
- // for (let canBuyItem of $.canBuyList) {
- // if (canBuyItem.needWoB <= $.woB) {
- // await furnituresCenterPurchase(canBuyItem.id, canBuyItem.jdBeanNum);
- // break
- // }
- // }
}
}
}
diff --git a/jd_syj.js b/jd_syj.js
index cd6dabfa..ea75fc27 100644
--- a/jd_syj.js
+++ b/jd_syj.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-11-27 09:19:21
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-11-27 09:58:02
+ * @Last Modified time: 2021-1-1 16:58:02
*/
/*
十元街脚本,一周签到下来可获得30京豆,一天任意时刻运行一次即可
@@ -93,7 +93,7 @@ function showMsg() {
let signFlag = 0;
function userSignIn() {
return new Promise(resolve => {
- const body = {"activityId":"8d6845fe2e77425c82d5078d314d33c5","inviterId":"VMIQlLQqjQyjZokQmv5bIDgq011L0Ov8","channel":"MiniProgram"};
+ const body = {"activityId":"ccd8067defcd4787871b7f0c96fcbf5c","inviterId":"","channel":"MiniProgram"};
$.get(taskUrl('userSignIn', body), async (err, resp, data) => {
try {
if (err) {
@@ -122,6 +122,10 @@ function userSignIn() {
signFlag ++;
await userSignIn();
}
+ } else if (data.code === 66) {
+ //此处有时会遇到 服务器繁忙 导致签到失败,故重复三次签到
+ $.log(`${$.name}签到失败:${data.msg}`);
+ message += `【签到】失败,${data.msg}`;
} else {
console.log(`异常:${JSON.stringify(data)}`)
}
diff --git a/sendNotify.js b/sendNotify.js
index eadb860b..b23e2e12 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-08-19 16:12:40
* @Last Modified by: lxk0301
- * @Last Modified time: 2020-12-21 13:52:54
+ * @Last Modified time: 2021-1-5 17:52:54
*/
const querystring = require("querystring");
const $ = new Env();
@@ -49,7 +49,7 @@ let DD_BOT_SECRET = '';
let QYWX_KEY = '';
// =======================================企业微信应用消息通知设置区域===========================================
-//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001
+//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://github.com/lxk0301/jd_scripts/issues/519) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM)
let QYWX_AM = '';
@@ -132,17 +132,21 @@ if (process.env.PUSH_PLUS_USER) {
async function sendNotify(text, desp, params = {}) {
//提供7种通知
- await serverNotify(text, desp);//微信server酱
- await pushPlusNotify(text, desp);//pushplus(推送加)
+ await Promise.all([
+ serverNotify(text, desp),//微信server酱
+ pushPlusNotify(text, desp)//pushplus(推送加)
+ ])
//由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动
text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text;
- await BarkNotify(text, desp, params);//iOS Bark APP
- await tgBotNotify(text, desp);//telegram 机器人
- await ddBotNotify(text, desp);//钉钉机器人
- await qywxBotNotify(text, desp); //企业微信机器人
- await qywxamNotify(text, desp); //企业微信应用消息推送
- await iGotNotify(text, desp, params);//iGot
- await CoolPush(text, desp);//QQ酷推
+ await Promise.all([
+ BarkNotify(text, desp, params),//iOS Bark APP
+ tgBotNotify(text, desp),//telegram 机器人
+ ddBotNotify(text, desp),//钉钉机器人
+ qywxBotNotify(text, desp), //企业微信机器人
+ qywxamNotify(text, desp), //企业微信应用消息推送
+ iGotNotify(text, desp, params),//iGot
+ CoolPush(text, desp)//QQ酷推
+ ])
}
function serverNotify(text, desp, timeout = 2100) {
@@ -430,7 +434,8 @@ function qywxamNotify(text, desp) {
'Content-Type': 'application/json',
},
};
- $.post(options_accesstoken, (err, resp, data) => {
+ $.post(options_accesstoken, (err, resp, data) => {
+ html=desp.replace(/\n/g,"
")
var json = JSON.parse(data);
accesstoken = json.access_token;
const options = {
@@ -438,12 +443,18 @@ function qywxamNotify(text, desp) {
json: {
touser:`${QYWX_AM_AY[2]}`,
agentid:`${QYWX_AM_AY[3]}`,
- msgtype: 'textcard',
- textcard: {
+ msgtype: 'mpnews',
+ mpnews: {
+ articles: [
+ {
title: `${text}`,
- description: `${desp}`,
- url: '127.0.0.1',
- btntxt: '更多'
+ thumb_media_id: `${QYWX_AM_AY[4]}`,
+ author : `智能助手` ,
+ content_source_url: ``,
+ content : `${html}`,
+ digest: `${desp}`
+ }
+ ]
},
safe:'0',
},
diff --git a/serverless.yml b/serverless.yml
index 98a0be61..d78fe00b 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -46,12 +46,12 @@ inputs:
cronExpression: "0 0 0-16/8,20 * * * *"
enable: true
argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_live
- - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝 #秒杀红包雨 #健康抽奖机
+ - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #东东小窝 #健康抽奖机
parameters:
- name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home_ms_redrain_health
+ name: redPacket_shop_unsubscribe_unbind_lotteryMachine_small_home_health
cronExpression: "0 10 0 * * * *"
enable: true
- argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home&jd_ms_redrain&jd_health
+ argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_unbind&jd_lotteryMachine&jd_small_home&jd_health
- timer: # 京东天天加速# 天天提鹅
parameters:
name: jd_speed_jd_daily_egg
@@ -64,18 +64,18 @@ inputs:
cronExpression: "0 15 * * * * *"
enable: true
argument: jd_superMarket
- - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励 #京东健康APP
+ - timer: #京豆变动通知 #疯狂的joy #京东排行榜 #领京豆额外奖励
parameters:
- name: bean_change_crazy_joy_rankingList_bean_home_jdh
+ name: bean_change_crazy_joy_rankingList_bean_home
cronExpression: "0 30 7 * * * *"
enable: true
- argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car&jd_jdh
- - timer: #金融养猪 #十元街 #京东快递 #发现-看一看 #京东赚赚 #金融打卡领年终奖
+ argument: jd_bean_change&jd_crazy_joy&jd_rankingList&jd_bean_home&jd_car
+ - timer: #金融养猪 #十元街 #京东快递 #京东赚赚
parameters:
- name: pigPet_syj_kd_watch_jdzz_jr_sign
+ name: pigPet_syj_kd_jdzz
cronExpression: "0 3 1 * * * *"
enable: true
- argument: jd_pigPet&jd_syj&jd_kd&jd_watch&jd_jdzz&jr_sign
+ argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz
environment: # 环境变量
variables: # 环境变量对象
AAA: BBB # 不要删除,用来格式化对齐追加的变量的
From b7cbdc6c6920289646c60332222e878b0e23ad8b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Tue, 5 Jan 2021 20:48:14 +0800
Subject: [PATCH 086/105] Update qqread.js
---
backUp/qqread.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/backUp/qqread.js b/backUp/qqread.js
index f72fe1f4..0ff1d2d9 100644
--- a/backUp/qqread.js
+++ b/backUp/qqread.js
@@ -62,7 +62,9 @@ const jsname = '企鹅读书'
const $ = Env(jsname)
let task = '', config, ssr2 = '', wktime, day = 0;
console.log(`\n========= 脚本执行时间(TM):${new Date(new Date().getTime() + 0 * 60 * 60 * 1000).toLocaleString('zh', {hour12: false})} =========\n`)
-const notify = require('../sendNotify');
+
+const notify = $.isNode() ? require('../sendNotify') : '';
+
const logs = 1; //0为关闭日志,1为开启
const TIME = 30//单次时长上传限制,默认5分钟
From 72940bd980318858e736d043edcd62f798dcbe65 Mon Sep 17 00:00:00 2001
From: huang28 <52352624+Huang28@users.noreply.github.com>
Date: Wed, 6 Jan 2021 03:10:22 +0800
Subject: [PATCH 087/105] Update sendNotify.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
企业微信应用消息通知
增加一个选择推送消息类型,用图文消息直接填写素材库图片id的值,用卡片消息就填写0(就是数字零)
---
sendNotify.js | 76 +++++++++++++++++++++++++++++++--------------------
1 file changed, 47 insertions(+), 29 deletions(-)
diff --git a/sendNotify.js b/sendNotify.js
index b23e2e12..47079790 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -50,6 +50,7 @@ let QYWX_KEY = '';
// =======================================企业微信应用消息通知设置区域===========================================
//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://github.com/lxk0301/jd_scripts/issues/519) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat
+//增加一个选择推送消息类型,用图文消息直接填写素材库图片id的值,用卡片消息就填写0(就是数字零)
//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM)
let QYWX_AM = '';
@@ -423,31 +424,48 @@ function qywxBotNotify(text, desp) {
function qywxamNotify(text, desp) {
return new Promise(resolve => {
if (QYWX_AM) {
- var QYWX_AM_AY = QYWX_AM.split(',');
- const options_accesstoken = {
- url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`,
- json: {
- corpid:`${QYWX_AM_AY[0]}`,
- corpsecret:`${QYWX_AM_AY[1]}`,
- },
- headers: {
- 'Content-Type': 'application/json',
- },
- };
- $.post(options_accesstoken, (err, resp, data) => {
- html=desp.replace(/\n/g,"
")
+ var QYWX_AM_AY = QYWX_AM.split(',');
+ const options_accesstoken = {
+ url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`,
+ json: {
+ corpid:`${QYWX_AM_AY[0]}`,
+ corpsecret:`${QYWX_AM_AY[1]}`,
+ },
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ };
+ $.post(options_accesstoken, (err, resp, data) => {
+ html=desp.replace(/\n/g,"
")
var json = JSON.parse(data);
accesstoken = json.access_token;
- const options = {
- url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`,
- json: {
- touser:`${QYWX_AM_AY[2]}`,
- agentid:`${QYWX_AM_AY[3]}`,
- msgtype: 'mpnews',
- mpnews: {
+ const options_textcard = {
+ url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`,
+ json: {
+ touser:`${QYWX_AM_AY[2]}`,
+ agentid:`${QYWX_AM_AY[3]}`,
+ msgtype: 'textcard',
+ textcard: {
+ title: `${text}`,
+ description: `${desp}`,
+ url: '127.0.0.1',
+ },
+ safe:'0',
+ },
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ };
+ const options_mpnews = {
+ url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`,
+ json: {
+ touser:`${QYWX_AM_AY[2]}`,
+ agentid:`${QYWX_AM_AY[3]}`,
+ msgtype: 'mpnews',
+ mpnews: {
articles: [
{
- title: `${text}`,
+ title: `${text}`,
thumb_media_id: `${QYWX_AM_AY[4]}`,
author : `智能助手` ,
content_source_url: ``,
@@ -455,14 +473,14 @@ function qywxamNotify(text, desp) {
digest: `${desp}`
}
]
- },
- safe:'0',
- },
- headers: {
- 'Content-Type': 'application/json',
- },
- };
- $.post(options, (err, resp, data) => {
+ },
+ safe:'0',
+ },
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ };
+ $.post((QYWX_AM_AY[4]==0)?options_textcard:options_mpnews, (err, resp, data) => {
try {
if (err) {
console.log('企业微信应用消息发送通知消息失败!!\n');
From ea9cc9a69949635ff4daeaacd2751c8379ca564d Mon Sep 17 00:00:00 2001
From: huang28 <52352624+Huang28@users.noreply.github.com>
Date: Wed, 6 Jan 2021 03:14:37 +0800
Subject: [PATCH 088/105] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E5=BA=94=E7=94=A8=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5=20?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=80=89=E6=8B=A9=E6=8E=A8?=
=?UTF-8?q?=E9=80=81=E6=B6=88=E6=81=AF=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
增加一个选择推送消息类型,用图文消息直接填充素材库图片id的值,用卡片消息就填写0(就是数字零)
---
sendNotify.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/sendNotify.js b/sendNotify.js
index 47079790..9c950f07 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -449,6 +449,7 @@ function qywxamNotify(text, desp) {
title: `${text}`,
description: `${desp}`,
url: '127.0.0.1',
+ btntxt: '更多'
},
safe:'0',
},
From 71ca2dc899054ab8b3e1f4a698d8cc8ac49903c2 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 09:20:23 +0800
Subject: [PATCH 089/105] =?UTF-8?q?=E5=9B=A0=E4=B8=9C=E4=B8=9C=E8=90=8C?=
=?UTF-8?q?=E5=AE=A01.6=E6=97=A5=E5=A5=BD=E5=8F=8B=E5=8A=A9=E5=8A=9B?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=8B=E7=BA=BF=E3=80=82=E6=95=85=E6=9A=82?=
=?UTF-8?q?=E6=97=B6=E5=B1=8F=E8=94=BD=E5=A5=BD=E5=8F=8B=E4=BA=92=E5=8A=A9?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=82=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=BF=E7=94=A8=E8=84=9A=E6=9C=AC=E5=87=BA?=
=?UTF-8?q?=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_pet.js | 14 ++++++++++----
sendNotify.js | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/jd_pet.js b/jd_pet.js
index cde3fd7f..3586c920 100644
--- a/jd_pet.js
+++ b/jd_pet.js
@@ -1,6 +1,6 @@
/*
东东萌宠 更新地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js
-更新时间:2020-12-26
+更新时间:2021-01-06
已支持IOS双京东账号,Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
@@ -231,8 +231,10 @@ async function masterHelpInit() {
if(!res.result.addedBonusFlag) {
console.log("开始领取额外奖励");
let getHelpAddedBonusResult = await request('getHelpAddedBonus');
+ if (getHelpAddedBonusResult.resultCode === '0') {
+ message += `【额外奖励${getHelpAddedBonusResult.result.reward}领取】${getHelpAddedBonusResult.message}\n`;
+ }
console.log(`领取30g额外奖励结果:【${getHelpAddedBonusResult.message}】`);
- message += `【额外奖励${getHelpAddedBonusResult.result.reward}领取】${getHelpAddedBonusResult.message}\n`;
} else {
console.log("已经领取过5好友助力额外奖励");
message += `【额外奖励】已领取\n`;
@@ -261,6 +263,8 @@ async function masterHelpInit() {
* 运行脚本时你自己的shareCode会在控制台输出, 可以将其分享给他人
*/
async function slaveHelp() {
+ $.log(`\n因1.6日好友助力功能下线。故暂时屏蔽\n`)
+ return
let helpPeoples = '';
for (let code of newShareCodes) {
console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${code}`);
@@ -281,7 +285,7 @@ async function slaveHelp() {
console.log(`助力其他情况:${JSON.stringify(response)}`);
}
} else {
- console.log(`助理好友结果: ${response.message}`);
+ console.log(`助力好友结果: ${response.message}`);
}
}
if (helpPeoples && helpPeoples.length > 0) {
@@ -467,7 +471,9 @@ function shareCodesFormat() {
const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1);
newShareCodes = shareCodes[tempIndex].split('@');
}
- const readShareCodeRes = await readShareCode();
+ //因好友助力功能下线。故暂时屏蔽
+ // const readShareCodeRes = await readShareCode();
+ const readShareCodeRes = null;
if (readShareCodeRes && readShareCodeRes.code === 200) {
newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])];
}
diff --git a/sendNotify.js b/sendNotify.js
index b23e2e12..11257565 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -569,7 +569,7 @@ function pushPlusNotify(text, desp) {
}
})
} else {
- console.log('\n您未提供push+推送所需的PUSH_PLUS_TOKEN,取消push+推送消息通知\n');
+ console.log('您未提供push+推送所需的PUSH_PLUS_TOKEN,取消push+推送消息通知\n');
resolve()
}
})
From 13c9c05a9cf303e24cfc139ba377d806d91d59d6 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 09:26:10 +0800
Subject: [PATCH 090/105] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=91=E6=8D=A2?=
=?UTF-8?q?=E4=BA=AC=E8=B1=86=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_joy_reward.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/jd_joy_reward.js b/jd_joy_reward.js
index 2eaf482d..76ed0fe4 100644
--- a/jd_joy_reward.js
+++ b/jd_joy_reward.js
@@ -1,6 +1,6 @@
/*
宠汪汪积分兑换奖品脚本, 目前脚本只兑换京豆,兑换京豆成功,才会发出通知提示,其他情况不通知。
-更新时间:2020-12-23
+更新时间:2021-1-6
兑换规则:一个账号一天只能兑换一次京豆。
兑换奖品成功后才会有系统弹窗通知
每日京豆库存会在0:00、8:00、16:00更新,经测试发现中午12:00也会有补发京豆。
@@ -127,9 +127,9 @@ async function joyReward() {
ctrTemp = `${jdNotify}` === 'false';
}
if (ctrTemp) {
- $.msg($.name, `兑换${giftValue}京豆成功`, `【京东账号${$.index}】${$.nickName}\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
+ $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
if ($.isNode()) {
- await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【兑换${giftValue}京豆】成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
+ await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`);
}
}
// if ($.isNode()) {
From ce8ed77430d2ba16365aee47684c74caf7589d3a Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 10:05:11 +0800
Subject: [PATCH 091/105] =?UTF-8?q?=E4=BC=81=E9=B9=85=E9=98=85=E8=AF=BB?=
=?UTF-8?q?=E6=96=B0=E5=A2=9Ecookie=E8=BF=87=E6=9C=9F=E6=8F=90=E9=86=92?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=80=E5=A4=A9=E5=8F=AA=E6=8E=A8?=
=?UTF-8?q?=E9=80=81=E4=B8=A4=E6=AC=A1=E9=80=9A=E7=9F=A5(=E8=87=AA?=
=?UTF-8?q?=E7=94=A8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backUp/qqread.js | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/backUp/qqread.js b/backUp/qqread.js
index 0ff1d2d9..3f8aa651 100644
--- a/backUp/qqread.js
+++ b/backUp/qqread.js
@@ -14,27 +14,6 @@ ziye
本人github地址 https://github.com/ziye12/JavaScript
转载请备注个名字,谢谢
-11.25 增加 阅读时长上传,阅读金币,阅读随机金币
-11.25 修复翻倍宝箱不同时领取的问题.增加阅读金币判定
-11.25 修复阅读时长问题,阅读金币问题,请重新获取时长cookie
-11.26 随机金币只有一次,故去除,调整修复阅读金币问题,增加时长上传限制
-11.26 增加领取周时长奖励
-11.26 增加结束命令
-11.27 调整通知为,成功开启宝箱再通知
-11.28 修复错误
-12.1 调整通知为15次宝箱通知一次
-12.1 优化通知
-
-⚠️cookie获取方法:
-
-进 https://m.q.qq.com/a/s/d3eacc70120b9a37e46bad408c0c4c2a 点我的 获取cookie
-
-进一本书 看 10秒以下 然后退出,获取阅读时长cookie,看书一定不能超过10秒
-
-可能某些页面会卡住,但是能获取到cookie,再注释cookie重写就行了!
-
-
-
⚠️宝箱奖励为20分钟一次,自己根据情况设置定时,建议设置11分钟一次
hostname=mqqapi.reader.qq.com
@@ -80,6 +59,7 @@ let qqreadtimeurlVal = $.getdata(qqreadtimeurlKey)
const qqreadtimeheaderKey = 'qqreadtimehd'
let qqreadtimeheaderVal = $.getdata(qqreadtimeheaderKey)
+let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
//云函数使用在下面填写
let QQ_READ_COOKIES = [
{
@@ -180,6 +160,7 @@ async function QQ_READ() {
for (let i = 0; i < QQ_READ_COOKIES.length; i++) {
$.log(`\n*************开始QQ账号${i + 1}**************\n`);
tz = '';
+ $.isLogin = true;
if (!QQ_READ_COOKIES[i]["qqreadbodyVal"] || !QQ_READ_COOKIES[i]['qqreadtimeurlVal'] || !QQ_READ_COOKIES[i]['qqreadtimeheaderVal']) {
$.log(`账号${i + 1}暂未提供脚本执行所需的cookie`);
continue
@@ -188,6 +169,13 @@ async function QQ_READ() {
qqreadtimeurlVal = QQ_READ_COOKIES[i]['qqreadtimeurlVal'];
qqreadtimeheaderVal = QQ_READ_COOKIES[i]['qqreadtimeheaderVal'];
await qqreadinfo();//用户名
+ if (!$.isLogin) {
+ $.log(`企鹅阅读账号${i + 1} cookie过期`);
+ if (nowTimes.getHours() % 12 === 0 && (nowTimes.getMinutes() > 0 && nowTimes.getMinutes() <= 15)) {
+ await notify.sendNotify(`企鹅阅读账号${i + 1} cookie过期`, '请及时更新 QQ_READ_TIME_HEADER_VAL')
+ }
+ continue
+ }
await qqreadwktime();//周时长查询
await qqreadtrack();
await qqreadconfig();//时长查询
@@ -236,8 +224,7 @@ async function QQ_READ() {
}
function showmsg() {
return new Promise(async resolve => {
- let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
- if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 15)) {
+ if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() > 0 && nowTimes.getMinutes() <= 15)) {
await notify.sendNotify(jsname, tz);
}
$.msg(jsname, "", tz);
@@ -328,6 +315,13 @@ function qqreadinfo() {
$.get(toqqreadinfourl, (error, response, data) => {
if (logs) $.log(`${jsname}, 用户名: ${data}`);
let info = JSON.parse(data);
+ if (info.code === 0) {
+ $.isLogin = info.data['isLogin'];
+ if (!$.isLogin) {
+ resolve();
+ return
+ }
+ }
kz += `\n========== 【${info.data.user.nickName}】 ==========\n`;
tz += `\n========== 【${info.data.user.nickName}】 ==========\n`;
From 1748754b6329e15bb22dd3b6787b3f81541c9808 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 10:53:02 +0800
Subject: [PATCH 092/105] =?UTF-8?q?=E4=BC=81=E9=B9=85=E9=98=85=E8=AF=BB?=
=?UTF-8?q?=E5=8D=95=E7=8B=AC=E5=BC=80=E5=AE=9D=E7=AE=B1(=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E8=87=AA=E7=94=A8)=EF=BC=8C=E5=85=A8=E9=83=A8?=
=?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=8F=AA=E9=80=9A=E7=9F=A5=E4=B8=80=E6=AC=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backUp/qqread.js | 1 -
backUp/qqreadOpenBox.js | 293 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 293 insertions(+), 1 deletion(-)
create mode 100644 backUp/qqreadOpenBox.js
diff --git a/backUp/qqread.js b/backUp/qqread.js
index 3f8aa651..e1e2639b 100644
--- a/backUp/qqread.js
+++ b/backUp/qqread.js
@@ -159,7 +159,6 @@ function GetCookie() {
async function QQ_READ() {
for (let i = 0; i < QQ_READ_COOKIES.length; i++) {
$.log(`\n*************开始QQ账号${i + 1}**************\n`);
- tz = '';
$.isLogin = true;
if (!QQ_READ_COOKIES[i]["qqreadbodyVal"] || !QQ_READ_COOKIES[i]['qqreadtimeurlVal'] || !QQ_READ_COOKIES[i]['qqreadtimeheaderVal']) {
$.log(`账号${i + 1}暂未提供脚本执行所需的cookie`);
diff --git a/backUp/qqreadOpenBox.js b/backUp/qqreadOpenBox.js
new file mode 100644
index 00000000..5182b6e5
--- /dev/null
+++ b/backUp/qqreadOpenBox.js
@@ -0,0 +1,293 @@
+/*
+lxk0301修改自用,单独开宝箱
+******************************************************************************
+本人github地址 https://github.com/ziye12/JavaScript
+转载请备注个名字,谢谢
+
+1.5 调整宝箱策略,20分钟运行一次就行
+*/
+const $ = Env(`企鹅读书开宝箱`)
+const notify = $.isNode() ? require("../sendNotify") : "";
+const logs = 1; //0为关闭日志,1为开启
+
+let task, tz = '', kz, config = '', CASH = '', COOKIES_SPLIT = '' ;
+let dk,ljyd,sp,ydrw,wktime;
+
+let qqreadbodyVal = ``;
+let qqreadtimeurlVal = ``;
+let qqreadtimeheaderVal = ``;
+let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
+//云函数使用在下面填写
+let QQ_READ_COOKIES = [
+ {
+ "qqreadbodyVal": ``,
+ "qqreadtimeurlVal": ``,
+ "qqreadtimeheaderVal": ``
+ }
+]
+
+!(async () => {
+ await getNodeCookie();
+ await open_box();
+})()
+.catch((e) => {
+ $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
+})
+.finally(() => {
+ $.done();
+})
+
+async function open_box() {
+ for (let i = 0; i < QQ_READ_COOKIES.length; i++) {
+ $.log(`\n*************开始QQ账号${i + 1}**************\n`);
+ // tz = '';
+ $.isLogin = true;
+ if (!QQ_READ_COOKIES[i]["qqreadbodyVal"] || !QQ_READ_COOKIES[i]['qqreadtimeurlVal'] || !QQ_READ_COOKIES[i]['qqreadtimeheaderVal']) {
+ $.log(`账号${i + 1}暂未提供脚本执行所需的cookie`);
+ continue
+ }
+ qqreadbodyVal = QQ_READ_COOKIES[i]['qqreadbodyVal'];
+ qqreadtimeurlVal = QQ_READ_COOKIES[i]['qqreadtimeurlVal'];
+ qqreadtimeheaderVal = QQ_READ_COOKIES[i]['qqreadtimeheaderVal'];
+ await qqreadinfo();//用户名
+ if (!$.isLogin) {
+ $.log(`企鹅阅读账号${i + 1} cookie过期`);
+ if (nowTimes.getHours() % 12 === 0 && (nowTimes.getMinutes() > 0 && nowTimes.getMinutes() <= 15)) {
+ await notify.sendNotify(`企鹅阅读账号${i + 1} cookie过期`, '请及时更新 QQ_READ_TIME_HEADER_VAL')
+ }
+ continue
+ }
+ //单独开宝箱
+ if (nowTimes.getHours() === 0 && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 59)) {
+ await qqreadtrack();//更新
+ }
+ await qqreadtask();//任务列表
+ if (task.data && ljyd.doneFlag == 0) {
+ await qqreaddayread();//阅读任务
+ }
+ if (task.data && task.data.treasureBox.timeInterval <= 10000) {
+ await $.wait(task.data.treasureBox.timeInterval)
+ await qqreadbox();//宝箱
+ }
+ if (task.data && task.data.treasureBox.timeInterval - 600000 <= 10000) {
+ await $.wait(task.data.treasureBox.timeInterval - 600000)
+ await qqreadbox2();//宝箱翻倍
+ }
+ }
+ await showmsg();//通知
+}
+
+
+function showmsg() {
+ return new Promise(async resolve => {
+ if (nowTimes.getHours() === 23 && (nowTimes.getMinutes() > 0 && nowTimes.getMinutes() <= 15)) {
+ await notify.sendNotify($.name, tz);
+ }
+ $.msg($.name, "", tz);
+ resolve()
+ })
+}
+
+
+// 更新
+function qqreadtrack() {
+ return new Promise((resolve, reject) => {
+ const body = qqreadbodyVal.replace(new RegExp(/"dis":[0-9]{13}/), `"dis":${new Date().getTime()}`)
+ const toqqreadtrackurl = {
+ url: "https://mqqapi.reader.qq.com/log/v4/mqq/track",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ body: body,
+ timeout: 60000,
+ };
+ $.post(toqqreadtrackurl, (error, response, data) => {
+ if (logs) $.log(`更新: ${data}`);
+ let track = JSON.parse(data);
+ const date = new Date(JSON.parse(qqreadbodyVal).dataList[0].dis)
+ let Y = date.getFullYear() + '-';
+ let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+ let D = date.getDate() + ' ';
+ let h = date.getHours() + ':';
+ let m = date.getMinutes() + ':';
+ let s = date.getSeconds();
+ let time = Y + M + D + h + m + s;
+ tz += `【数据更新】:更新${track.msg},\n【cookie获取时间】${time}\n`;
+ kz += `【数据更新】:更新${track.msg},\n【cookie获取时间】${time}\n`;
+ resolve();
+ });
+ });
+}
+// 用户名
+function qqreadinfo() {
+ return new Promise((resolve, reject) => {
+ const toqqreadinfourl = {
+ url: "https://mqqapi.reader.qq.com/mqq/user/init",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ timeout: 60000,
+ };
+ $.get(toqqreadinfourl, (error, response, data) => {
+ if (logs) $.log(`用户名: ${data}`);
+ const info = JSON.parse(data);
+ if (info.code === 0) {
+ $.isLogin = info.data['isLogin'];
+ if (!$.isLogin) {
+ resolve();
+ return
+ }
+ }
+ kz += `\n========== 【${info.data.user.nickName}】 ==========\n`;
+ tz += `\n========== 【${info.data.user.nickName}】 ==========\n`;
+
+ resolve();
+ });
+ });
+}
+// 任务列表
+function qqreadtask() {
+ return new Promise((resolve, reject) => {
+ const toqqreadtaskurl = {
+ url: "https://mqqapi.reader.qq.com/mqq/red_packet/user/page?fromGuid=",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ timeout: 60000,
+ };
+ $.get(toqqreadtaskurl, (error, response, data) => {
+ if (logs) $.log(`任务列表: ${data}`);
+ task = JSON.parse(data);
+ dk = task.data.taskList.find(item => item.type === 200);
+ ljyd = task.data.taskList.find(item => item.type === 210);
+ ydrw = task.data.taskList.find(item => item.type === 220);
+ sp = task.data.taskList.find(item => item.type === 230);
+
+ if (task.data.invite.nextInviteConfig) {
+ tz +=
+ `【现金余额】:${(task.data.user.amount / 10000).toFixed(2)}元\n` +
+ `【第${task.data.invite.issue}期】:时间${task.data.invite.dayRange}\n` +
+ ` 已邀请${task.data.invite.inviteCount}人,再邀请${task.data.invite.nextInviteConfig.count}人获得${task.data.invite.nextInviteConfig.amount}金币\n` +
+ `【${dk.title}】:${dk.amount}金币,${dk.actionText}\n` +
+ `【${ljyd.title}】:${ljyd.amount}金币,${ljyd.actionText}\n` +
+ `【${ydrw.title}】:${ydrw.amount}金币,${ydrw.actionText}\n` +
+ `【${sp.title}】:${sp.amount}金币,${sp.actionText}\n` +
+ `【宝箱任务${task.data.treasureBox.count + 1}】:${task.data.treasureBox.timeInterval / 1000
+ }秒后领取\n` +
+ `【${task.data.fans.title}】:${task.data.fans.fansCount}个好友,${task.data.fans.todayAmount}金币\n`;
+ }
+
+ kz +=
+ `【现金余额】:${(task.data.user.amount / 10000).toFixed(2)}元\n` +
+ `【宝箱任务${task.data.treasureBox.count + 1}】:${task.data.treasureBox.timeInterval / 1000
+ }秒后领取\n` +
+ `【已开宝箱】:${task.data.treasureBox.count}个\n`;
+
+ resolve();
+ });
+ });
+}
+// 每日阅读
+function qqreaddayread() {
+ return new Promise((resolve, reject) => {
+ const toqqreaddayreadurl = {
+ url: "https://mqqapi.reader.qq.com/mqq/red_packet/user/read_book",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ timeout: 60000,
+ };
+ $.get(toqqreaddayreadurl, (error, response, data) => {
+ if (logs) $.log(`每日阅读: ${data}`);
+ let dayread = JSON.parse(data);
+ if (dayread.code == 0) {
+ tz += `【每日阅读】:获得${dayread.data.amount}金币\n`;
+ kz += `【每日阅读】:获得${dayread.data.amount}金币\n`;
+ }
+ resolve();
+ });
+ });
+}
+// 宝箱奖励
+function qqreadbox() {
+ return new Promise((resolve, reject) => {
+ const toqqreadboxurl = {
+ url: "https://mqqapi.reader.qq.com/mqq/red_packet/user/treasure_box",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ timeout: 60000,
+ };
+ $.get(toqqreadboxurl, (error, response, data) => {
+ if (logs) $.log(`宝箱奖励: ${data}`);
+ let box = JSON.parse(data);
+ if (box.code == 0 && box.data.amount) {
+ tz += `【宝箱奖励${box.data.count}】:获得${box.data.amount}金币\n`;
+ kz += `【宝箱奖励${box.data.count}】:获得${box.data.amount}金币\n`;
+ }
+
+ resolve();
+ });
+ });
+}
+// 宝箱奖励翻倍
+function qqreadbox2() {
+ return new Promise((resolve, reject) => {
+ const toqqreadbox2url = {
+ url:
+ "https://mqqapi.reader.qq.com/mqq/red_packet/user/treasure_box_video",
+ headers: JSON.parse(qqreadtimeheaderVal),
+ timeout: 60000,
+ };
+ $.get(toqqreadbox2url, (error, response, data) => {
+ if (logs) $.log(`宝箱奖励翻倍: ${data}`);
+ let box2 = JSON.parse(data);
+ if (box2.code == 0 && box2.data.amount) {
+ tz += `【宝箱翻倍】:获得${box2.data.amount}金币\n`;
+ kz += `【宝箱翻倍】:获得${box2.data.amount}金币\n`;
+ }
+ resolve();
+ });
+ });
+}
+function getNodeCookie() {
+ if ($.isNode()) {
+ let QQ_READ_BODY_VAL = [], QQ_READ_TIME_URL_VAL = [], QQ_READ_TIME_HEADER_VAL = [];
+ if (process.env.QQ_READ_HEADER_VAL) {
+ if (process.env.QQ_READ_HEADER_VAL.indexOf('@') > -1) {
+ console.log(`您的QQ_READ_HEADER_VAL选择的是用@隔开\n`)
+ QQ_READ_BODY_VAL = process.env.QQ_READ_HEADER_VAL.split('@');
+ } else if (process.env.QQ_READ_HEADER_VAL.indexOf('\n') > -1) {
+ console.log(`您的QQ_READ_HEADER_VAL选择的是用换行隔开\n`)
+ QQ_READ_BODY_VAL = process.env.QQ_READ_HEADER_VAL.split('\n');
+ } else {
+ QQ_READ_BODY_VAL = [process.env.QQ_READ_HEADER_VAL];
+ }
+ }
+ if (process.env.QQ_READ_TIME_URL_VAL) {
+ if (process.env.QQ_READ_TIME_URL_VAL.indexOf('@') > -1) {
+ console.log(`您的QQ_READ_TIME_URL_VAL选择的是用@隔开\n`)
+ QQ_READ_TIME_URL_VAL = process.env.QQ_READ_TIME_URL_VAL.split('@');
+ } else if (process.env.QQ_READ_HEADER_VAL.indexOf('\n') > -1) {
+ console.log(`您的QQ_READ_TIME_URL_VAL选择的是用换行隔开\n`)
+ QQ_READ_TIME_URL_VAL = process.env.QQ_READ_TIME_URL_VAL.split('\n');
+ } else {
+ QQ_READ_TIME_URL_VAL = [process.env.QQ_READ_TIME_URL_VAL];
+ }
+ // QQ_READ_TIME_URL_VAL = [...new Set(QQ_READ_TIME_URL_VAL)]
+ }
+ if (process.env.QQ_READ_TIME_HEADER_VAL) {
+ if (process.env.QQ_READ_TIME_HEADER_VAL.indexOf('@') > -1) {
+ console.log(`您的QQ_READ_TIME_HEADER_VAL选择的是用@隔开\n`)
+ QQ_READ_TIME_HEADER_VAL = process.env.QQ_READ_TIME_HEADER_VAL.split('@');
+ } else if (process.env.QQ_READ_TIME_HEADER_VAL.indexOf('\n') > -1) {
+ console.log(`您的QQ_READ_TIME_HEADER_VAL选择的是用换行隔开\n`)
+ QQ_READ_TIME_HEADER_VAL = process.env.QQ_READ_TIME_HEADER_VAL.split('\n');
+ } else {
+ QQ_READ_TIME_HEADER_VAL = [process.env.QQ_READ_TIME_HEADER_VAL];
+ }
+ // QQ_READ_TIME_HEADER_VAL = [...new Set(QQ_READ_TIME_HEADER_VAL)]
+ }
+ if (QQ_READ_BODY_VAL && QQ_READ_BODY_VAL.length > 0) QQ_READ_COOKIES = [];
+ for (let i = 0; i < QQ_READ_BODY_VAL.length; i ++) {
+ QQ_READ_COOKIES.push({
+ "qqreadbodyVal": QQ_READ_BODY_VAL[i] || "",
+ "qqreadtimeurlVal": QQ_READ_TIME_URL_VAL[i] || "",
+ "qqreadtimeheaderVal": QQ_READ_TIME_HEADER_VAL[i] || ""
+ })
+ }
+ // console.log(`${JSON.stringify(QQ_READ_COOKIES)}`)
+ }
+}
+// prettier-ignore
+function Env(t, e) { class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
\ No newline at end of file
From 8ee7ac5a26a1cdf5bc856b578643940b8166281f Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 11:40:21 +0800
Subject: [PATCH 093/105] fix
---
jd_get_share_code.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/jd_get_share_code.js b/jd_get_share_code.js
index 5b44c5cb..a23754d1 100644
--- a/jd_get_share_code.js
+++ b/jd_get_share_code.js
@@ -661,5 +661,16 @@ function taskPostUrl(function_id, body = {}, function_id2) {
},
};
}
+function jsonParse(str) {
+ if (typeof str == "string") {
+ try {
+ return JSON.parse(str);
+ } catch (e) {
+ console.log(e);
+ $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie')
+ return [];
+ }
+ }
+}
// prettier-ignore
function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)}
From 3c4d7ced3bab4f6738b70a96a5d1d72a95f27ab6 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 16:02:25 +0800
Subject: [PATCH 094/105] fix jd_joy_run.js
---
README.md | 3 ++-
jd_joy_run.js | 66 ++++++++++++++++++++++++++-------------------------
2 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
index 245ab57f..68c4d189 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,8 @@
**脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js**
**TODO**
-- [ ] 所有活动互助码在一个脚本打印
+- [x] 所有活动互助码在一个脚本打印
+- [ ] 京喜工厂添加预测N天后可兑换功能
## 邀请码互助
- [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
diff --git a/jd_joy_run.js b/jd_joy_run.js
index 2b18c1e0..66e3d520 100644
--- a/jd_joy_run.js
+++ b/jd_joy_run.js
@@ -1,6 +1,6 @@
/**
宠汪汪邀请助力与赛跑助力脚本,感谢github@Zero-S1提供帮助
-更新时间:2020-12-16(宠汪汪助力更新Token的配置正则表达式已改)
+更新时间:2021-1-6(宠汪汪助力更新Token的配置正则表达式已改)
token时效很短,几个小时就失效了,闲麻烦的放弃就行
每天拿到token后,可一次性运行完毕即可。
@@ -245,37 +245,39 @@ async function invite(invite_pins) {
for (let item of invite_pins.map(item => item.trim())) {
console.log(`\n账号${$.index} [${UserName}] 开始给好友 [${item}] 进行邀请助力`)
const data = await enterRoom(item);
- if (!data.success && data.errorCode === 'B0001') {
- console.log('京东Cookie失效');
- $.msg($.name, `【提示】京东cookie已失效`, `京东账号${$.index} ${UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
- $.jdLogin = false;
- break
- } else {
- const { helpStatus } = data.data;
- console.log(`helpStatus ${helpStatus}`)
- if (helpStatus=== 'help_full') {
- console.log(`您的邀请助力机会已耗尽\n`)
- break;
- } else if (helpStatus=== 'cannot_help') {
- console.log(`已给该好友 ${item} 助力过或者此friendPin是你自己\n`)
- continue;
- } else if (helpStatus=== 'invite_full') {
- console.log(`助力失败,该好友 ${item} 已经满3人给他助力了,无需您再次助力\n`)
- continue;
- } else if (helpStatus=== 'can_help') {
- console.log(`开始给好友 ${item} 助力\n`)
- const LKYL_DATA = await helpInviteFriend(item);
- if (LKYL_DATA.errorCode === 'L0001' && !LKYL_DATA.success) {
- console.log('来客有礼宠汪汪token失效');
- $.setdata('', 'jdJoyRunToken');
- $.msg($.name, '【提示】来客有礼token失效,请重新获取', "微信搜索'来客有礼'小程序\n点击底部的'发现'Tab\n即可获取Token")
- $.LKYLLogin = false;
- break
- } else {
- $.LKYLLogin = true;
+ if (data) {
+ if (!data.success && data.errorCode === 'B0001') {
+ console.log('京东Cookie失效');
+ $.msg($.name, `【提示】京东cookie已失效`, `京东账号${$.index} ${UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+ $.jdLogin = false;
+ break
+ } else {
+ const { helpStatus } = data.data;
+ console.log(`helpStatus ${helpStatus}`)
+ if (helpStatus=== 'help_full') {
+ console.log(`您的邀请助力机会已耗尽\n`)
+ break;
+ } else if (helpStatus=== 'cannot_help') {
+ console.log(`已给该好友 ${item} 助力过或者此friendPin是你自己\n`)
+ continue;
+ } else if (helpStatus=== 'invite_full') {
+ console.log(`助力失败,该好友 ${item} 已经满3人给他助力了,无需您再次助力\n`)
+ continue;
+ } else if (helpStatus=== 'can_help') {
+ console.log(`开始给好友 ${item} 助力\n`)
+ const LKYL_DATA = await helpInviteFriend(item);
+ if (LKYL_DATA.errorCode === 'L0001' && !LKYL_DATA.success) {
+ console.log('来客有礼宠汪汪token失效');
+ $.setdata('', 'jdJoyRunToken');
+ $.msg($.name, '【提示】来客有礼token失效,请重新获取', "微信搜索'来客有礼'小程序\n点击底部的'发现'Tab\n即可获取Token")
+ $.LKYLLogin = false;
+ break
+ } else {
+ $.LKYLLogin = true;
+ }
}
+ $.jdLogin = true;
}
- $.jdLogin = true;
}
}
// if ($.inviteReward > 0) {
@@ -293,8 +295,8 @@ function enterRoom(invitePin) {
$.get(options, (err, resp, data) => {
try {
if (err) {
- $.log('API请求失败')
- $.logErr(JSON.stringify(err));
+ $.log(`${$.name} API请求失败`)
+ $.log(JSON.stringify(err))
} else {
data = JSON.parse(data);
// console.log('进入房间', data)
From 2c45482520a86ca3cf0a7de4385e423580b7749b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 16:20:10 +0800
Subject: [PATCH 095/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20jd=5Fjoy=5Frun.js?=
=?UTF-8?q?=E9=82=80=E8=AF=B7=E5=8A=A9=E5=8A=9B=E6=8A=A5=E9=94=99=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_joy_run.js | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/jd_joy_run.js b/jd_joy_run.js
index 66e3d520..a8f414d7 100644
--- a/jd_joy_run.js
+++ b/jd_joy_run.js
@@ -246,12 +246,7 @@ async function invite(invite_pins) {
console.log(`\n账号${$.index} [${UserName}] 开始给好友 [${item}] 进行邀请助力`)
const data = await enterRoom(item);
if (data) {
- if (!data.success && data.errorCode === 'B0001') {
- console.log('京东Cookie失效');
- $.msg($.name, `【提示】京东cookie已失效`, `京东账号${$.index} ${UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
- $.jdLogin = false;
- break
- } else {
+ if (data.success) {
const { helpStatus } = data.data;
console.log(`helpStatus ${helpStatus}`)
if (helpStatus=== 'help_full') {
@@ -277,6 +272,13 @@ async function invite(invite_pins) {
}
}
$.jdLogin = true;
+ } else {
+ if (data.errorCode === 'B0001') {
+ console.log('京东Cookie失效');
+ $.msg($.name, `【提示】京东cookie已失效`, `京东账号${$.index} ${UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
+ $.jdLogin = false;
+ break
+ }
}
}
}
@@ -289,10 +291,11 @@ function enterRoom(invitePin) {
headers.Cookie = cookie;
headers.LKYLToken = $.LKYLToken;
const options = {
- url: `${JD_BASE_API}/enterRoom?reqSource=weapp&invitePin=${encodeURI(invitePin)}`,
+ url: `${JD_BASE_API}/enterRoom/h5?reqSource=weapp&invitePin=${encodeURI(invitePin)}&inviteSource=task_invite&shareSource=weapp&inviteTimeStamp=${Date.now()}`,
+ body: '{}',
headers
}
- $.get(options, (err, resp, data) => {
+ $.post(options, (err, resp, data) => {
try {
if (err) {
$.log(`${$.name} API请求失败`)
From 029f983892319390a557c8a41e1df1684116264f Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 22:55:20 +0800
Subject: [PATCH 096/105] Update qqread.js
---
backUp/qqread.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backUp/qqread.js b/backUp/qqread.js
index e1e2639b..abb07afa 100644
--- a/backUp/qqread.js
+++ b/backUp/qqread.js
@@ -218,12 +218,12 @@ async function QQ_READ() {
if (task.data.user.amount >= 100000) {
await qqreadwithdraw();
}
- await showmsg();//通知
}
+ await showmsg();//通知
}
function showmsg() {
return new Promise(async resolve => {
- if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() > 0 && nowTimes.getMinutes() <= 15)) {
+ if (nowTimes.getHours() === 22 && (nowTimes.getMinutes() > 45 && nowTimes.getMinutes() <= 59)) {
await notify.sendNotify(jsname, tz);
}
$.msg(jsname, "", tz);
From c9333b3b181be674b4db6667ad76b9d1f6e0db88 Mon Sep 17 00:00:00 2001
From: DoveBoy <393366046@qq.com>
Date: Wed, 6 Jan 2021 23:22:57 +0800
Subject: [PATCH 097/105] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E4=BA=AC=E4=B8=9C=E6=B1=BD=E8=BD=A6=E5=85=91=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
云函数新增京东汽车兑换
---
serverless.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/serverless.yml b/serverless.yml
index d78fe00b..0ec42cab 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -22,12 +22,12 @@ inputs:
cronExpression: "0 0 0 * * * *"
enable: true
argument: jd_bean_sign
- - timer: #京小超兑换奖品 #摇京豆 #京东汽车
+ - timer: #京小超兑换奖品 #摇京豆 #京东汽车 #京东汽车兑换
parameters:
- name: jd_blueCoin_jd_club_lottery_car
+ name: jd_blueCoin_jd_club_lottery_car_car_exchange
cronExpression: "0 0 0 * * * *"
enable: true
- argument: jd_blueCoin&jd_club_lottery&jd_car
+ argument: jd_blueCoin&jd_club_lottery&jd_car&jd_car_exchange
- timer: # 东东农场# 东东萌宠
parameters:
name: jd_fruit_jd_pet
From 6c2e79c06b892925f1a0486805ebc3336af3d55b Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Wed, 6 Jan 2021 23:30:28 +0800
Subject: [PATCH 098/105] Update lxk0301_Task.sgmodule.sgmodule
---
Surge/lxk0301_Task.sgmodule.sgmodule | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule
index f359b012..05983570 100644
--- a/Surge/lxk0301_Task.sgmodule.sgmodule
+++ b/Surge/lxk0301_Task.sgmodule.sgmodule
@@ -56,7 +56,9 @@ cron "40 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scrip
#领京豆额外奖励
cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励
#京东汽车
-cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车
+cron "0 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车
+#京东汽车积分兑换京豆
+cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, timeout=2750, 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=京东快递签到
#京东直播(活动结束时间未知)
From 93e7bf7803bec9260c267671a49d0591f7bd0321 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 7 Jan 2021 12:54:35 +0800
Subject: [PATCH 099/105] fix jd_bean_sign.js
---
jd_bean_sign.js | 4 ++--
sendNotify.js | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/jd_bean_sign.js b/jd_bean_sign.js
index fb3fee0e..bf57c6d0 100644
--- a/jd_bean_sign.js
+++ b/jd_bean_sign.js
@@ -1,7 +1,7 @@
/*
京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js
Node.JS专用
-更新时间:2021-1-4
+更新时间:2021-1-7
从 github @ruicky改写而来
version v0.0.1
create by ruicky
@@ -76,7 +76,7 @@ async function execSign() {
const barkContentStart = notifyContent.indexOf('【签到概览】')
const barkContentEnd = notifyContent.length;
if (process.env.JD_BEAN_SIGN_STOP_NOTIFY === 'true') return
- if (notify.BARK_PUSH) process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = 'true';
+ if (process.env.BARK_PUSH || notify.BARK_PUSH) process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = 'true';
if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') {
if (barkContentStart > -1 && barkContentEnd > -1) {
BarkContent = notifyContent.substring(barkContentStart, barkContentEnd);
diff --git a/sendNotify.js b/sendNotify.js
index df0be539..071c6184 100644
--- a/sendNotify.js
+++ b/sendNotify.js
@@ -2,7 +2,7 @@
* @Author: lxk0301 https://github.com/lxk0301
* @Date: 2020-08-19 16:12:40
* @Last Modified by: lxk0301
- * @Last Modified time: 2021-1-5 17:52:54
+ * @Last Modified time: 2021-1-7 17:52:54
*/
const querystring = require("querystring");
const $ = new Env();
@@ -595,7 +595,8 @@ function pushPlusNotify(text, desp) {
}
module.exports = {
- sendNotify
+ sendNotify,
+ BARK_PUSH
}
// prettier-ignore
function Env(t,s){return new class{constructor(t,s){this.name=t,this.data=null,this.dataFile="box.dat",this.logs=[],this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,s),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}getScript(t){return new Promise(s=>{$.get({url:t},(t,e,i)=>s(i))})}runScript(t,s){return new Promise(e=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=s&&s.timeout?s.timeout:o;const[h,a]=i.split("@"),r={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":h,Accept:"*/*"}};$.post(r,(t,s,i)=>e(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s);if(!e&&!i)return{};{const i=e?t:s;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s),o=JSON.stringify(this.data);e?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(s,o):this.fs.writeFileSync(t,o)}}lodash_get(t,s,e){const i=s.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return e;return o}lodash_set(t,s,e){return Object(t)!==t?t:(Array.isArray(s)||(s=s.toString().match(/[^.[\]]+/g)||[]),s.slice(0,-1).reduce((t,e,i)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(s[i+1])>>0==+s[i+1]?[]:{},t)[s[s.length-1]]=e,t)}getdata(t){let s=this.getval(t);if(/^@/.test(t)){const[,e,i]=/^@(.*?)\.(.*?)$/.exec(t),o=e?this.getval(e):"";if(o)try{const t=JSON.parse(o);s=t?this.lodash_get(t,i,""):s}catch(t){s=""}}return s}setdata(t,s){let e=!1;if(/^@/.test(s)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(s),h=this.getval(i),a=i?"null"===h?null:h||"{}":"{}";try{const s=JSON.parse(a);this.lodash_set(s,o,t),e=this.setval(JSON.stringify(s),i)}catch(s){const h={};this.lodash_set(h,o,t),e=this.setval(JSON.stringify(h),i)}}else e=$.setval(t,s);return e}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,s){return this.isSurge()||this.isLoon()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=t,this.writedata(),!0):this.data&&this.data[s]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,s=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,s)=>{try{const e=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(e,null),s.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)))}post(t,s=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t));else if(this.isNode()){this.initGotEnv(t);const{url:e,...i}=t;this.got.post(e,i).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t))}}time(t){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}msg(s=t,e="",i="",o){const h=t=>!t||!this.isLoon()&&this.isSurge()?t:"string"==typeof t?this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0:"object"==typeof t&&(t["open-url"]||t["media-url"])?this.isLoon()?t["open-url"]:this.isQuanX()?t:void 0:void 0;$.isMute||(this.isSurge()||this.isLoon()?$notification.post(s,e,i,h(o)):this.isQuanX()&&$notify(s,e,i,h(o))),this.logs.push("","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),this.logs.push(s),e&&this.logs.push(e),i&&this.logs.push(i)}log(...t){t.length>0?this.logs=[...this.logs,...t]:console.log(this.logs.join(this.logSeparator))}logErr(t,s){const e=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();e?$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){const s=(new Date).getTime(),e=(s-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,s)}
From 7fcaa4a9c71952bce34d84df081d9071d2e66281 Mon Sep 17 00:00:00 2001
From: any
Date: Thu, 7 Jan 2021 13:36:42 +0800
Subject: [PATCH 100/105] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B1=BD=E8=BD=A6?=
=?UTF-8?q?=E6=97=85=E7=A8=8B=E8=B5=9B=E7=82=B9=E5=85=91=E6=8D=A2=E9=87=91?=
=?UTF-8?q?=E8=B1=86=E3=80=81=E5=AF=BC=E5=87=BA=E6=89=80=E6=9C=89=E4=BA=92?=
=?UTF-8?q?=E5=8A=A9=E7=A0=81=E7=9A=84=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/crontab_list.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh
index 4dbf59b8..d1aa1383 100644
--- a/docker/crontab_list.sh
+++ b/docker/crontab_list.sh
@@ -4,8 +4,9 @@
50 23 */3 * * rm -rf /scripts/logs/*.log
##############短期活动##############
-# 健康抽奖机(2020.12.31活动过期)
+# 健康抽奖机
10 0 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1
+
##############长期活动##############
# 签到
0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
@@ -77,3 +78,7 @@
44 4 * * 6 node /scripts/jd_unbind.js >> /scripts/logs/jd_unbind.log 2>&1
# crazyJoy自动每日任务
10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1
+# 京东汽车旅程赛点兑换金豆
+0 0 * * * node /scripts/jd_car_exchange.js >> /scripts/logs/jd_car_exchange.log 2>&1
+# 导到所有互助码
+47 7 * * * node /scripts/jd_get_share_code.js >> /scripts/logs/jd_get_share_code.log 2>&1
From aea369a763015abd0f47435b6d4faca96e27b278 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 7 Jan 2021 14:05:50 +0800
Subject: [PATCH 101/105] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20jd=5Fjoy=5Frun.js?=
=?UTF-8?q?=E9=82=80=E8=AF=B7=E5=8A=A9=E5=8A=9B=E5=87=BA=E7=8E=B0=E5=BC=82?=
=?UTF-8?q?=E5=B8=B8=E7=9A=84bug(Env=E6=B2=A1=E6=B7=B1=E6=8B=B7=E8=B4=9D?=
=?UTF-8?q?=E5=86=8D=E5=81=9A=E5=88=A0=E9=99=A4Content-Type=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C=E7=9A=84)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_joy_run.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/jd_joy_run.js b/jd_joy_run.js
index a8f414d7..3e0e4899 100644
--- a/jd_joy_run.js
+++ b/jd_joy_run.js
@@ -1,6 +1,6 @@
/**
宠汪汪邀请助力与赛跑助力脚本,感谢github@Zero-S1提供帮助
-更新时间:2021-1-6(宠汪汪助力更新Token的配置正则表达式已改)
+更新时间:2021-1-7(宠汪汪助力更新Token的配置正则表达式已改)
token时效很短,几个小时就失效了,闲麻烦的放弃就行
每天拿到token后,可一次性运行完毕即可。
@@ -41,7 +41,7 @@ const JD_BASE_API = `https://draw.jdfcloud.com//pet`;
//下面给出好友邀请助力的示例填写规则
let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"];
//下面给出好友赛跑助力的示例填写规则
-let run_pins = ["被折叠的记忆33,jd_6cd93e613b0e5,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd,jd_sIhNpDXJehOr,jd_704a2e5e28a66"];
+let run_pins = ["被折叠的记忆33,jd_6cd93e613b0e5,jd_45a6b5953b15b,jd_66f5cecc1efcd,jd_sIhNpDXJehOr,jd_704a2e5e28a66,zooooo58"];
// $.LKYLToken = '76fe7794c475c18711e3b47185f114b5' || $.getdata('jdJoyRunToken');
// $.LKYLToken = $.getdata('jdJoyRunToken');
const friendsArr = ["yhr_19820404", "13008094886_p", "13966269193_p", "jd_4e4d9825e5fb1", "jd_5ff306cf94512", "ququkoko", "jd_59a9823f35496", "529577509-275616", "18923155789_p", "jd_455da88071d1e", "dreamscometrue5120", "蒋周南19620607", "jd_620ceca400151", "杉雨2011", "MARYMY88", "13682627696_p", "jd_6777ee65f9fcc", "夏海东12315", "jd_437b4f3fa5d83", "zyjyc9998", "meoygua", "MLHK7288", "jd_42d9ce3001acd", "jd_57650a30ef6eb", "jd_44ca1016e0f96", "jd_74332d1d62a97", "jd_7dbe4f8a40a7d", "jd_4fa238e4e3039", "elbereth1122", "jd_4d9be23908e41", "jd_51f0d43d78900", "13588108107_p", "123by456", "09niuniuma", "143798682-947527", "jd_560c6f30e6951", "jd_54ddb8af5374a", "夏革平", "247466310", "wang2011", "chensue", "1362245003-624122", "wdGefYCBlyOuvz", "jd_412f7eb363cd8", "18311575050_p", "1307976-34738981", "wdgOGLtOJjjbnp", "klhzdx", "jd_5fdcdcb183d7d", "jd_5862fd8834680", "jd_6cd93e613b0e5", "jd_51a64a9da6b94", "302990512-553401", "jd_4078f69a72873", "jd_ewYCRdmukzQH", "13348822441_p", "hlcx86021", "390823571-784974", "jd_79af2bc7a56a3", "15053231812_p", "jd_6f53253d117c5", "jd_5bf29dffa62ea", "jd_47a1c4ad02103", "刘凤苓", "145391572-102667", "yanglan0409", "jd_4b8a70f3b06c3", "弑神X", "jd_59d962a076126", "sjw3000", "jd_4d4def8b59787", "L1518235423", "jd_579b891fbea9b", "frank818", "hellohuhua", "jd_4cf1918577871", "jd_akYbyiXqrIDC", "李纪红", "jd_54a4260ca986c", "jd_4cba35cfa8220", "13654075776_p", "13916051043", "jd_6f9b9a6769afb", "iamkgbfox", "jd_5fbda9be54d5b", "jd_76763ba485c5e", "jd_45a6b5953b15b", "jd_485c757b79422", "xiaojingang_0", "lanye1545", "chenzhiyun2002", "lmpbjs1988", "jd_SmPxpudoGYOb", "jwl19690905", "荷舞弄清影88", "jd_750d6a9734717", "jd_64e37854e713f", "jd_573c9832d8989", "wdkplHVQlgowTW", "wwk232323", "jd_6bfe51f915c90", "我手机号码", "13681610268_p", "ss836580793", "15868005933_p", "zooooo58", "陌上花开花又落", "jd_701f52f8badbb", "jd_462f9229c20e4", "jd_42193689987a0", "jd_7dc5829121bcc", "13656692651_phz", "jd_47f49f22f1dc3", "handechun959", "13775208986_p", "guoyizhang", "jd_677dd20bf2749", "被折叠的记忆33", "jd_FfAnqFVEoBul", "jd_4e59841cae4f9", "jd_5279d593e7803", "思绪随风2011", "jd_62e335d785872", "suyugen", "jd_4e68b48d16f7b", "jd_56b7a4e092e85", "cocoty", "jd_7b6d6e7dc98f1", "jd_63423cd594e8b", "greatyunyun", "4349小丢丢", "18027486801_p", "15207695569_p", "llbai11", "wdNRUvbJItetlvB", "jd_54154982c707f", "85192cool", "jd_60d497271825b", "greatyunyun9320", "ky252571504", "jd_74e60dbcae365", "wdiicnSbYSHWwE", "jd_529a0a309d418", "jd_7be92b11b7e8f", "13486659225_p", "jd_iFnquhpWWAzO", "jd_6e348ece13e20", "jd_6f5b49bb757cb", "znz传奇", "418001066_m", "jd_67ded5748c3ab", "361372-27819972", "jd_5fafb631c98af", "jd_76dd04e844d63", "小鹿Jenny", "00数字方程式", "jd_77a82b603c6c3", "勇敢的小泪", "jd_4481f68984466", "jd_758f5224ee957", "mwb1992062_m", "15975229552_p", "zdj8341", "pet_virtual_friend_胡皋三", "pet_virtual_friend_绿茶sama", "pet_virtual_friend_Ainio", "jd_4915949b7bfa1", "jd_7ca74ed9224ef", "jd_42764f5ea2341", "5317123-63418293", "jd_40a2d9485cbdb", "qazmcl1230", "jd_7ced325aba4fd", "jd_402fe7425fcaf", "95581245-627991", "luffy-314_m", "jd_BCXgLlmxHdiS", "jd_610b3d00928e5", "你要醒来", "338379384-148135", "pet_virtual_friend_乔治桑", "jd_54130a3e282ea", "jd_6169b3411ed5b", "jd_428d930ca56a5", "qq6924309", "pet_virtual_friend_路遇狗与少年", "jd_712bd3bfd55d6", "jd_4e97fe5ca4003", "tommy_he1", "13981372001_p", "129867657-673064", "jd_525d6e7a57e7c", "wdZuirGekSHKmF", "jd_75e1da74980ab", "jd_RVMXldNSQNOP", "jd_5f94da0265e0d", "jd_67ab629be7e61", "13887490621_p", "jd_4e0d529ba3c35", "jd_493918e314b50", "jd_71a220104187a", "jd_vVhhkdUpTkJQ", "gary388jingdong", "wdjQkAbFobMTyo", "cloud_kim", "jd_558ed75f52d39", "15555448319_p", "wdhxZuEvXhhvCf", "jd_72b940be8c0f4", "congcong炒葱葱", "jd_7eb0de64eb25a", "13209558123_p", "jd_53bf7cb6fb8e6", "jd_4fe620f72fa7c", "夏雨的爱情", "jd_47ba82eb392a5", "jd_LXnFHXoJwXkW", "62160785-578856", "醒醒该睡了", "jd_LOEWgvNwQIWD", "xiiirww", "pet_virtual_friend_特兰克斯", "pet_virtual_friend_Talon", "jd_4f7cd5b108733", "jd_NgNWXMVkJIvk", "jadonglin", "玩家卫弈", "liangxuejingdong", "jd_627171efb7c0a", "jd_53bc7a14f64d6", "15809290902_p", "jd_65a2ab73d9aa5", "jd_6edb943cacbfb", "jd_7f7eabc5caf7d", "jd_725e17effb6a9", "蔡辉煌", "voxb", "gdxx_hhw_m", "jd_78f0d6524a1dc", "jd_sDtnONLeHwfG", "xyyshy1983", "yinlang46", "ypqian", "15817094457_p", "fdxwb", "wuyaoxin2012", "明子溪", "henry1927_m", "chamy99", "jd_461e384274c34", "248358330-645106", "jd_4fd63de4a6033", "蜜糖向日葵", "wonghe", "36453197-121619", "琳琅满目cbb", "jd_5b7cc9e532426", "134795344-89911673", "15211488203_p", "jd_6f1f0722f8365", "jd_JmGCpqgpCtqG", "墨明棋妙陈", "pet_virtual_friend_1314爱澳", "1209815-33190621", "zhouhuayh", "jd_6d3cbb8b0751a", "jd_6e00e826f939b", "jd_704a2e5e28a66", "mztvip", "davidharry", "sara35424", "sun5025", "jd_62ce2385bb364", "352834026-406289", "pet_virtual_friend_丁座的真爱粉", "jd_582eecf8d27a9", "jd_49acdb02e8514", "13976911784_p", "jd_uGzohbhFpRuz", "wzywolfgang", "yjbonny", "沧海不轮回", "649297742_327799447", "倚兰椒", "琳琳8796", "snzh2013", "jd_73751adc04afd", "wdNnlMzPGJJKgqI", "yygt1158", "jd_53df36eb204a0", "花开花花落", "jd_611e082213c89", "jd_71e77d9235cf5", "jd_596fd9fea411f", "jd_7277d200aa1ac", "15230573701_p", "zb19881021", "692620136落", "168876810-159969", "zhushidan100", "上自习的猪", "15602231009_p", "jd_5213fd3fd5e09", "jd_6711f97ee4dfe", "44787591-640051", "MisterGlasses", "jd_7b22bbfe1e7e5", "138555963-81748582", "jd_QEVVkkDTQAlJ", "4932713-24535180", "jd_6dce98c07a644", "jd_DUtPtiiDamDr", "wangyneu", "wBm1TsDy3p_m", "jd_6acd3a6cc79cc","jd_444f5c020f31c","jd_71caf6b3ec4cb", "shin_dynasty", "carola82", "jd_AOhLSBLdSnux", "ningbormb"];
@@ -290,6 +290,7 @@ function enterRoom(invitePin) {
return new Promise(resolve => {
headers.Cookie = cookie;
headers.LKYLToken = $.LKYLToken;
+ headers['Content-Type'] = "application/json";
const options = {
url: `${JD_BASE_API}/enterRoom/h5?reqSource=weapp&invitePin=${encodeURI(invitePin)}&inviteSource=task_invite&shareSource=weapp&inviteTimeStamp=${Date.now()}`,
body: '{}',
@@ -301,8 +302,8 @@ function enterRoom(invitePin) {
$.log(`${$.name} API请求失败`)
$.log(JSON.stringify(err))
} else {
- data = JSON.parse(data);
// console.log('进入房间', data)
+ data = JSON.parse(data);
}
} catch (e) {
$.logErr(e, resp)
From a3250f85f494ea86838c14a1fbf64c5792102eee Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Thu, 7 Jan 2021 18:08:26 +0800
Subject: [PATCH 102/105] =?UTF-8?q?=E4=B8=9C=E4=B8=9C=E8=B6=85=E5=B8=82?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E5=BC=80=E5=BA=97=E9=93=BA=E4=BC=9A?=
=?UTF-8?q?=E5=91=98=E5=8D=A1=E5=BE=97=E8=93=9D=E5=B8=81=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?(=E5=81=87=E5=85=A5=E4=BC=9A)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_car_exchange.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jd_car_exchange.js b/jd_car_exchange.js
index 69f923be..a91eeb18 100644
--- a/jd_car_exchange.js
+++ b/jd_car_exchange.js
@@ -55,8 +55,8 @@ const JD_API_HOST = 'https://car-member.jd.com/api/';
if (cookiesArr[i]) {
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
- console.log(`京东账号${i}`)
$.index = i + 1;
+ console.log(`京东账号${$.index} ${$.UserName}`)
$.isLogin = true;
$.nickName = '';
message = '';
From fdd9cae4f43e3792eef9a68b291bdded9cfcf593 Mon Sep 17 00:00:00 2001
From: everbef0re
Date: Thu, 7 Jan 2021 21:05:49 +0800
Subject: [PATCH 103/105] remove 404 scripts
---
QuantumultX/lxk0301_gallery.json | 6 ------
1 file changed, 6 deletions(-)
diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json
index a3709536..913a5b0c 100644
--- a/QuantumultX/lxk0301_gallery.json
+++ b/QuantumultX/lxk0301_gallery.json
@@ -24,20 +24,14 @@
"13 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://github.com/58xinian/icon/raw/master/ddxw.png",
"10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png",
"0 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://github.com/58xinian/icon/raw/master/jd_syj.png",
- "15 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
"10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png",
"0 0 * * * 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",
"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",
- "40 9,10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_watch.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 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png",
"14 11 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png",
"44 12 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png",
"30 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png",
- "1 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"
]
}
From be3d4cdfd5a6e1b4e91deaaee4938ddc79b35f20 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 8 Jan 2021 09:13:37 +0800
Subject: [PATCH 104/105] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20jd=5Fget=5Fshare?=
=?UTF-8?q?=5Fcode.js=20=E9=A1=B6=E9=83=A8=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_car_exchange.js | 6 +++++-
jd_get_share_code.js | 22 ++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/jd_car_exchange.js b/jd_car_exchange.js
index a91eeb18..c203e2d3 100644
--- a/jd_car_exchange.js
+++ b/jd_car_exchange.js
@@ -1,7 +1,11 @@
/*
京东汽车兑换,500赛点兑换500京豆
长期活动
-活动入口:首页👉京东汽车兑换👉屏幕右中部,车主福利
+
+活动入口
+京东APP:首页👉京东汽车兑换👉屏幕右中部,车主福利
+活动网页地址:https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html#/journey
+
更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange
已支持IOS双京东账号, Node.js支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
diff --git a/jd_get_share_code.js b/jd_get_share_code.js
index a23754d1..92a07997 100644
--- a/jd_get_share_code.js
+++ b/jd_get_share_code.js
@@ -1,3 +1,25 @@
+/*
+一键获取我仓库所以脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码)
+没必要设置(cron)定时执行,需要的时候,自己手动执行一次即可
+
+更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js
+已支持IOS双京东账号, Node.js支持N个京东账号
+脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
+============Quantumultx===============
+[task_local]
+#获取互助码
+20 13 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码, enabled=true
+
+================Loon==============
+[Script]
+cron "20 13 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码
+
+===============Surge=================
+获取互助码 = type=cron,cronexp="20 13 * * 6",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js
+
+============小火箭=========
+获取互助码 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, cronexpr="20 13 * * 6", timeout=200, enable=true
+ */
const $ = new Env("获取互助码");
const JD_API_HOST = "https://api.m.jd.com/client.action";
let cookiesArr = [], cookie = '', message;
From 9fcf401557ecc8bfd671dfbcfed79e4f4acd3212 Mon Sep 17 00:00:00 2001
From: lxk0301 <778732665@qq.com>
Date: Fri, 8 Jan 2021 10:22:49 +0800
Subject: [PATCH 105/105] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20jd=5Fget=5Fshare?=
=?UTF-8?q?=5Fcode.js=20=E9=A1=B6=E9=83=A8=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jd_get_share_code.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/jd_get_share_code.js b/jd_get_share_code.js
index 92a07997..8a6e1edc 100644
--- a/jd_get_share_code.js
+++ b/jd_get_share_code.js
@@ -1,5 +1,5 @@
/*
-一键获取我仓库所以脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码)
+一键获取我仓库所有需要互助类脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码)
没必要设置(cron)定时执行,需要的时候,自己手动执行一次即可
更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js
@@ -152,6 +152,7 @@ if ($.isNode()) {
cookiesArr.reverse();
cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
cookiesArr.reverse();
+ cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
}
!(async () => {
if (!cookiesArr[0]) {
@@ -170,9 +171,7 @@ if ($.isNode()) {
if (!$.isLogin) {
continue
}
- console.log(`======账号${$.index}开始======`)
await getShareCode()
- console.log(`======账号${$.index}结束======\n`)
}
}
})()
@@ -598,6 +597,7 @@ async function getJoy(){
})
}
async function getShareCode() {
+ console.log(`======账号${$.index}开始======`)
await getJdFactory()
await getJxFactory()
await getJdPet()
@@ -605,6 +605,7 @@ async function getShareCode() {
await getJDFruit()
await getJdZZ()
await getJoy()
+ console.log(`======账号${$.index}结束======\n`)
}
function safeGet(data) {