From e4dd7d2e79b0d9e12006a371dbc42a410724ea15 Mon Sep 17 00:00:00 2001 From: guyuexuan <2651919937@qq.com> Date: Fri, 8 Jan 2021 15:30:28 +0800 Subject: [PATCH 01/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=AC=E5=96=9C?= =?UTF-8?q?=E5=86=9C=E5=9C=BA=E4=BA=92=E5=8A=A9=E7=A0=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_get_share_code.js | 53 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/jd_get_share_code.js b/jd_get_share_code.js index 8a6e1edc..6ed99774 100644 --- a/jd_get_share_code.js +++ b/jd_get_share_code.js @@ -244,7 +244,7 @@ function getJxFactory(){ try { if (err) { console.log(`${JSON.stringify(err)}`); - console.log(`惊喜工厂 API请求失败,请检查网路重试`); + console.log(`京喜工厂 API请求失败,请检查网路重试`); } else { if (safeGet(data)) { data = JSON.parse(data); @@ -262,7 +262,7 @@ function getJxFactory(){ $.commodityDimId = production.commodityDimId; $.encryptPin = data.user.encryptPin; // subTitle = data.user.pin; - console.log(`【账号${$.index}(${$.nickName || $.UserName})惊喜工厂】${data.user.encryptPin}`); + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜工厂】${data.user.encryptPin}`); } } else { $.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产 @@ -289,6 +289,54 @@ function getJxFactory(){ ); }) } + +function getJxNc(){ + const JXNC_API_HOST = "https://wq.jd.com/"; + + function JXNC_taskurl(function_path, body) { + return { + url: `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=&phoneid=×tamp=&sceneval=2&g_login_type=1&_=${Date.now()}&g_ty=ls`, + headers: { + Cookie: cookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `wq.jd.com`, + 'Accept-Language': `zh-cn`, + }, + }; + } + + return new Promise(resolve => { + $.get( + JXNC_taskurl('query', `type=1`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京喜农场 API请求失败,请检查网路重试`); + } else { + data = data.match(/try\{Query\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + if (safeGet(data)) { + data = JSON.parse(data); + if (data["ret"] === 0) { + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场】${data["smp"]}`); + } + } else { + console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + } + ); + }) +} + function getJdPet(){ const JDPet_API_HOST = "https://api.m.jd.com/client.action"; @@ -600,6 +648,7 @@ async function getShareCode() { console.log(`======账号${$.index}开始======`) await getJdFactory() await getJxFactory() + await getJxNc() await getJdPet() await getPlantBean() await getJDFruit() From 2378e2019ccab80c78e1abfcd1c1e9910a310cff Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Sat, 9 Jan 2021 01:47:40 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E6=A0=BC=E5=AD=90=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E8=A2=AB=E5=8D=A0=E6=9C=89=E4=B8=94=E6=B2=A1=E6=9C=89=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=90=88=E5=B9=B6=E7=9A=84JOY=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=9B=9E=E6=94=B6=E4=BD=8E=E7=BA=A7=E7=9A=84JOY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_crazy_joy_coin.js | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 8824b85a..ceaf0e1b 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -210,6 +210,16 @@ async function jdJxStory() { $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`) $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`) } + + // 如果格子全部被占有且没有可以合并的JOY,只能回收低级的JOY + if(checkHasFullOccupied() && !checkCanMerge()) { + const minYoyId = Math.min(...$.joyIds); + const boxId = $.joyIds.indexOf(minYoyId); + console.log(`格子全部被占有且没有可以合并的JOY,回收${boxId + 1}号位等级为${minYoyId}的JOY`) + await sellJoy(minYoyId, boxId); + await getJoyList(); + } + for (let i = 0; i < $.joyIds.length; ++i) { if (!$.canBuy) { $.log(`金币不足,跳过购买`) @@ -248,6 +258,26 @@ async function jdJxStory() { console.log(`当前信息:${$.bean} 京豆,${$.coin} 金币`) } +function checkHasFullOccupied() { + return !$.joyIds.includes(0); +} + +function checkCanMerge() { + let obj = {}; + let canMerge = false; + $.joyIds.forEach((vo, idx) => { + if (vo !== 0) { + if (obj[vo]) { + obj[vo].push(idx) + canMerge = true; + } else { + obj[vo] = [idx] + } + } + }); + return canMerge; +} + function getJoyList() { $.joyIds = [] return new Promise(async resolve => { @@ -362,6 +392,38 @@ function buyJoy(joyId) { }) } +// 出售(回收)joy +function sellJoy(joyId, boxId) { + const body = {"action": "SELL", "joyId": joyId, "boxId": boxId} + return new Promise((resolve) => { + $.get(taskUrl('crazyJoy_joy_trade', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success) { + if (data.data.eventInfo) { + await openBox(data.data.eventInfo.eventType, data.data.eventInfo.eventRecordId) + $.canBuy = false + return + } + $.log(`回收${joyId}级joy成功,剩余金币【${data.data.totalCoins}】`) + $.coin = data.data.totalCoins + } else { + console.log(data.message) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + function hourBenefit() { let body = {"eventType": "HOUR_BENEFIT"} return new Promise(async resolve => { From 6419286ef3927f4a04e8a710f3d1a4e95174bab1 Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Sat, 9 Jan 2021 01:52:05 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_crazy_joy_coin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index ceaf0e1b..25969487 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -213,10 +213,10 @@ async function jdJxStory() { // 如果格子全部被占有且没有可以合并的JOY,只能回收低级的JOY if(checkHasFullOccupied() && !checkCanMerge()) { - const minYoyId = Math.min(...$.joyIds); - const boxId = $.joyIds.indexOf(minYoyId); - console.log(`格子全部被占有且没有可以合并的JOY,回收${boxId + 1}号位等级为${minYoyId}的JOY`) - await sellJoy(minYoyId, boxId); + const minJoyId = Math.min(...$.joyIds); + const boxId = $.joyIds.indexOf(minJoyId); + console.log(`格子全部被占有且没有可以合并的JOY,回收${boxId + 1}号位等级为${minJoyId}的JOY`) + await sellJoy(minJoyId, boxId); await getJoyList(); } From d3bb982cf042a0b44609e358210f8b11da1dface Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Sat, 9 Jan 2021 10:03:22 +0800 Subject: [PATCH 04/27] =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=90=88=E5=B9=B6=EF=BC=8C=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=8E=8934=E7=BA=A7JOY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_crazy_joy_coin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 25969487..4119d7c7 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -266,7 +266,7 @@ function checkCanMerge() { let obj = {}; let canMerge = false; $.joyIds.forEach((vo, idx) => { - if (vo !== 0) { + if (vo !== 0 && vo !== 34) { if (obj[vo]) { obj[vo].push(idx) canMerge = true; From caaf3922124d8e20e0f7ce41c0b777ed4038c0ac Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Sat, 9 Jan 2021 17:57:51 +0800 Subject: [PATCH 05/27] =?UTF-8?q?=E6=B2=A1=E6=9C=8934=E7=BA=A7JOY=E6=97=B6?= =?UTF-8?q?=E6=89=8D=E4=BC=9A=E6=89=A7=E8=A1=8C=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_crazy_joy_coin.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 4119d7c7..089eac49 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -211,8 +211,8 @@ async function jdJxStory() { $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`) } - // 如果格子全部被占有且没有可以合并的JOY,只能回收低级的JOY - if(checkHasFullOccupied() && !checkCanMerge()) { + // 如果格子全部被占有且没有可以合并的JOY,只能回收低级的JOY (没有34级JOY时才会执行) + if(checkHasFullOccupied() && !checkCanMerge() && !checkHas34Level()) { const minJoyId = Math.min(...$.joyIds); const boxId = $.joyIds.indexOf(minJoyId); console.log(`格子全部被占有且没有可以合并的JOY,回收${boxId + 1}号位等级为${minJoyId}的JOY`) @@ -262,6 +262,11 @@ function checkHasFullOccupied() { return !$.joyIds.includes(0); } +// 查询是否有34级JOY +function checkHas34Level() { + return $.joyIds.includes(34); +} + function checkCanMerge() { let obj = {}; let canMerge = false; From 72a2c3f89bd8fe48461de0e191ccd4c9f2aae437 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Sun, 10 Jan 2021 12:36:46 +0800 Subject: [PATCH 06/27] Update jd_pet.js --- jd_pet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jd_pet.js b/jd_pet.js index ebe4e917..ee3397e9 100644 --- a/jd_pet.js +++ b/jd_pet.js @@ -1,6 +1,6 @@ /* 东东萌宠 更新地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js -更新时间:2021-01-06 +更新时间:2021-01-10 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js @@ -123,7 +123,7 @@ async function jdPet() { await petSport();//遛弯 await slaveHelp();//助力好友 - //await masterHelpInit();//获取助力的信息 + await masterHelpInit();//获取助力的信息 await doTask();//做日常任务 await feedPetsAgain();//再次投食 await energyCollect();//收集好感度 @@ -263,8 +263,8 @@ async function masterHelpInit() { * 运行脚本时你自己的shareCode会在控制台输出, 可以将其分享给他人 */ async function slaveHelp() { - $.log(`\n因1.6日好友助力功能下线。故暂时屏蔽\n`) - return + //$.log(`\n因1.6日好友助力功能下线。故暂时屏蔽\n`) + //return let helpPeoples = ''; for (let code of newShareCodes) { console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${code}`); From a1c6a5e23236b088d2ebc89857f4d34714d0c557 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Sun, 10 Jan 2021 12:38:22 +0800 Subject: [PATCH 07/27] Update jd_pet.js --- jd_pet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_pet.js b/jd_pet.js index ee3397e9..6f11aa5b 100644 --- a/jd_pet.js +++ b/jd_pet.js @@ -472,8 +472,8 @@ function shareCodesFormat() { newShareCodes = shareCodes[tempIndex].split('@'); } //因好友助力功能下线。故暂时屏蔽 - // const readShareCodeRes = await readShareCode(); - const readShareCodeRes = null; + const readShareCodeRes = await readShareCode(); + //const readShareCodeRes = null; if (readShareCodeRes && readShareCodeRes.code === 200) { newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; } From 252329471e18067bf8ad6b18322a4139e399a5b1 Mon Sep 17 00:00:00 2001 From: Akira Date: Sun, 10 Jan 2021 13:26:18 +0800 Subject: [PATCH 08/27] exclude jd_car_exchange.js exclude jd_car_exchange.js from random delay task list --- docker/default_task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/default_task.sh b/docker/default_task.sh index 6c4bfe94..f86d9a09 100644 --- a/docker/default_task.sh +++ b/docker/default_task.sh @@ -110,7 +110,7 @@ fi 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 + sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\|jd_car_exchange.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile fi else echo "未配置随即延迟对应的环境变量,故不设置延迟任务" From 5b789c8bff0b78d79362d1ab64363ffc6eef1b57 Mon Sep 17 00:00:00 2001 From: guyuexuan <2651919937@qq.com> Date: Sun, 10 Jan 2021 14:06:22 +0800 Subject: [PATCH 09/27] =?UTF-8?q?=E6=90=AC=E8=BF=90=E4=BA=AC=E5=96=9C?= =?UTF-8?q?=E5=86=9C=E5=9C=BA=E8=84=9A=E6=9C=AC=20=E5=A2=9E=E5=8A=A0=20nod?= =?UTF-8?q?ejs=20token=20&=20shareCode=20=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20=E5=A4=84=E7=90=86=E5=A4=9A=E8=B4=A6=E5=8F=B7=20tok?= =?UTF-8?q?en=20=E6=9C=AA=E9=85=8D=E7=BD=AE=E6=97=B6=E5=8F=AF=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=B7=B3=E8=BF=87=E6=AD=A4=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jdJxncShareCodes.js | 32 ++ jdJxncTokens.js | 29 ++ jd_get_share_code.js | 3 +- jd_jxnc.js | 779 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 842 insertions(+), 1 deletion(-) create mode 100644 jdJxncShareCodes.js create mode 100644 jdJxncTokens.js create mode 100644 jd_jxnc.js diff --git a/jdJxncShareCodes.js b/jdJxncShareCodes.js new file mode 100644 index 00000000..48d1856a --- /dev/null +++ b/jdJxncShareCodes.js @@ -0,0 +1,32 @@ +/* +京喜农场助力码 +此助力码要求种子 active 相同才能助力,多个账号的话可以种植同样的种子,如果种子不同的话,会自动跳过使用云端助力 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写京京喜农场的好友码。 +// github action用户的好友助力码填写到Action->Settings->Secrets->new Secret里面(Name填写 JxncShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写助力码,填写规则如下) +// 同一个京东账号的好友助力码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let JxncShareCodes = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] +// 判断github action里面是否有京喜农场助力码 +if (process.env.JXNCSHARECODES) { + if (process.env.JXNCSHARECODES.indexOf('&') > -1) { + console.log(`您的京喜农场助力码选择的是用&隔开\n`) + JxncShareCodes = process.env.JXNCSHARECODES.split('&'); + } else if (process.env.JXNCSHARECODES.indexOf('\n') > -1) { + console.log(`您的京喜农场助力码选择的是用换行隔开\n`) + JxncShareCodes = process.env.JXNCSHARECODES.split('\n'); + } else { + JxncShareCodes = process.env.JXNCSHARECODES.split(); + } +} else if (process.env.JD_COOKIE) { + // console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < JxncShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['JxncShareCode' + index] = JxncShareCodes[i]; +} diff --git a/jdJxncTokens.js b/jdJxncTokens.js new file mode 100644 index 00000000..009c0bcf --- /dev/null +++ b/jdJxncTokens.js @@ -0,0 +1,29 @@ +/* +京喜农场 Tokens +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +// 每个账号 token 是一个 json,示例如下 +// {"farm_jstoken":"749a90f871adsfads8ffda7bf3b1576760","timestamp":"1610165423873","phoneid":"42c7e3dadfadsfdsaac-18f0e4f4a0cf"} +let JxncTokens = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] +// 判断github action里面是否有京喜农场 token +if (process.env.JXNCTOKENS) { + if (process.env.JXNCTOKENS.indexOf('&') > -1) { + console.log(`您的京喜农场 token 选择的是用&隔开\n`) + JxncTokens = process.env.JXNCTOKENS.split('&'); + } else if (process.env.JXNCTOKENS.indexOf('\n') > -1) { + console.log(`您的京喜农场 token 选择的是用换行隔开\n`) + JxncTokens = process.env.JXNCTOKENS.split('\n'); + } else { + JxncTokens = process.env.JXNCTOKENS.split(); + } +} else if (process.env.JD_COOKIE) { + console.log(`由于您secret里面未提供 tokens,当种植 APP 种子时,将不能正常进行任务,请提供 token 或 种植非 APP 种子!`) +} +for (let i = 0; i < JxncTokens.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['JXNCTOKEN' + index] = JxncTokens[i]; +} diff --git a/jd_get_share_code.js b/jd_get_share_code.js index 43b888b6..83b52a7c 100644 --- a/jd_get_share_code.js +++ b/jd_get_share_code.js @@ -321,7 +321,8 @@ function getJxNc(){ if (safeGet(data)) { data = JSON.parse(data); if (data["ret"] === 0) { - console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场】${data["smp"]}`); + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场助力码】${data["smp"]}`); + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场active】 ${$.info.active}`); } } else { console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`); diff --git a/jd_jxnc.js b/jd_jxnc.js new file mode 100644 index 00000000..035c2ea3 --- /dev/null +++ b/jd_jxnc.js @@ -0,0 +1,779 @@ +/* +特别声明: +本脚本搬运自 https://github.com/whyour/hundun/blob/master/quanx/jx_nc.js +感谢 @whyour 大佬 + +京喜农场:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js +更新时间:2021-01-09 20:46:10 +东东农场活动链接:https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2 +已支持IOS双京东账号,Node.js支持N个京东账号 +理论上脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +助力码shareCode请先手动运行脚本查看打印可看到 + +==========================Quantumultx========================= +[task_local] +0 9,12,18 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, tag=京喜农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxnc.png, enabled=true +[rewrite_local] +^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask url script-request-header https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js +=========================Loon============================= +[Script] +http-request ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc_cookie.js, requires-body=false, timeout=10, tag=京喜农场cookie +cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js,tag=京喜农场 + +=========================Surge============================ +京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=60,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js +京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc_cookie.js + +=========================小火箭=========================== +京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true + +*/ + +const $ = new Env('京喜农场'); +let notify = ''; // nodejs 发送通知脚本 +let cookieArr = []; // 用户 cookie 数组 +let currentCookie = ''; // 当前用户 cookie +let tokenNull = {'farm_jstoken': '', 'phoneid': '', 'timestamp': ''}; // 内置一份空的 token +let tokenArr = []; // 用户 token 数组 +let currentToken = {}; // 当前用户 token +const shareCode = '22bd6fbbabbaa770a45ab2607e7a1e8a@197c6094e965fdf3d33621b47719e0b1'; // 内置助力码 +let jxncShareCodeArr = []; // 用户 助力码 数组 +let currentShareCode = []; // 当前用户 要助力的助力码 +const openUrl = `openjd://virtual?params=${encodeURIComponent('{ "category": "jump", "des": "m", "url": "https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2"}',)}`; // 打开京喜农场 +let subTitle = '', message = '', option = {'open-url': openUrl}; // 消息副标题,消息正文,消息扩展参数 +const JXNC_API_HOST = 'https://wq.jd.com/'; + +$.helpTask = null; +$.allTask = []; // 任务列表 +$.info = {}; // 用户信息 +$.answer = 0; +$.drip = 0; +$.maxHelpNum = shareCode.split('@').length; // 助力 ret 1011 错误最大计数 +$.helpNum = 0; // 当前账号 助力 ret 1011 次数 + +!(async () => { + await requireConfig(); + if (!cookieArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + + for (let i = 0; i < cookieArr.length; i++) { + if (cookieArr[i]) { + currentCookie = cookieArr[i]; + $.UserName = decodeURIComponent(currentCookie.match(/pt_pin=(.+?);/) && currentCookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.log(`检查【京东账号${$.index}】${$.UserName} cookie 是否有效`); + await TotalBean(); + $.log(`开始【京东账号${$.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 + } + subTitle = ''; + message = ''; + option = {}; + $.helpNum = 0; + await tokenFormat(); // 处理当前账号 token + await shareCodesFormat(); // 处理当前账号 助力码 + await jdJXNC(); // 执行当前账号 主代码流程 + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + console.log(e); + }) + .finally(() => { + $.done(); + }) + +// 加载配置 cookie token shareCode +function requireConfig() { + return new Promise(resolve => { + $.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdTokenNode = $.isNode() ? require('./jdJxncTokens.js') : ''; + const jdJxncShareCodeNode = $.isNode() ? require('./jdJxncShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookieArr.push(jdCookieNode[item]); + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + } else { + cookieArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]); + } + + $.log(`共${cookieArr.length}个京东账号\n`); + + if ($.isNode()) { + Object.keys(jdTokenNode).forEach((item) => { + tokenArr.push(tokenArr[item] ? JSON.parse(jxncShareCodeArr[item]) : tokenNull) + }) + } else { + tokenArr.push(...[$.getdata('jxnc_token1') || tokenNull, $.getdata('jxnc_token2') || tokenNull]); + } + + if ($.isNode()) { + Object.keys(jdJxncShareCodeNode).forEach((item) => { + if (jxncShareCodeArr[item]) { + jxncShareCodeArr.push(jxncShareCodeArr[item]) + } + }) + } + + // console.log(`jdFruitShareArr::${JSON.stringify(jdFruitShareArr)}`) + // console.log(`jdFruitShareArr账号长度::${jdFruitShareArr.length}`) + $.log(`您提供了${jxncShareCodeArr.length}个账号的京喜农场助力码`); + resolve() + }) +} + +// 查询京东账户信息(检查 cookie 是否有效) +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": currentCookie, + "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(); + } + }) + }) +} + +// 处理当前账号token +function tokenFormat() { + return new Promise(async resolve => { + if (tokenArr[$.index - 1] && tokenArr[$.index - 1].farm_jstoken) { + currentToken = tokenArr[$.index - 1]; + } else { + currentToken = tokenNull; + } + resolve(); + }) +} + +// 处理当前账号助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${jdFruitShareArr[$.index - 1]}`) + if (jxncShareCodeArr[$.index - 1]) { + currentShareCode = jxncShareCodeArr[$.index - 1].split('@'); + let length = currentShareCode.length; + if (length < 3) { + currentShareCode.push(...(shareCode.split('@').splice(0, 3 - length))); + } + } else { + $.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码`) + currentShareCode = shareCode.split('@'); + } + $.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(currentShareCode)}`) + resolve(); + }) +} + +async function jdJXNC() { + subTitle = `【京东账号${$.index}】${$.nickName}`; + $.log(`获取用户信息 & 任务列表`); + const startInfo = await getTaskList(); + if (!startInfo) { // 未选择种子时,当前账号流程结束 + return false; + } + message += `【水果名称】${startInfo.prizename}\n`; + $.log(`【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】 ${$.info.smp}`); + $.log(`【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}种子active】 ${$.info.active}`); + await $.wait(500); + const isOk = await browserTask(); + if (!isOk) { + return false; + } + await $.wait(500); + await answerTask(); + await $.wait(500); + const endInfo = await getTaskList(); + getMessage(endInfo, startInfo); + const next = await helpFriends(); + if (next) { + await submitInviteId($.UserName); + await $.wait(500); + await createAssistUser(); + } + await showMsg() +} + +// 获取任务列表与用户信息 +function getTaskList() { + return new Promise(async resolve => { + $.get(taskUrl('query', `type=1`), async (err, resp, data) => { + try { + const res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + const {detail, msg, task = [], retmsg, ...other} = JSON.parse(res); + $.helpTask = task.filter(x => x.tasktype === 2)[0]; + $.allTask = task.filter(x => x.tasktype !== 3 && x.tasktype !== 2 && parseInt(x.left) > 0); + $.info = other; + $.log(`获取任务列表 ${retmsg} 总共${$.allTask.length}个任务!`); + if (!$.info.active) { + $.log('账号未选择种子,请先去京喜农场选择种子,选择 APP 专属种子时,必须提供 token'); + $.msg($.name, subTitle, '请先去京喜农场选择种子!\n选择app专属种子时,请参考脚本头部说明获取token,点击通知跳转', option); + if ($.isNode()) { + await notify.sendNotify(`${$.name}`, `京东账号${$.index}[${$.nickName || $.UserName}]请先去京喜农场选择种子!\n选择app专属种子时,请参考脚本头部说明获取token`); + } + resolve(false); + } + resolve(other); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(true); + } + }); + }); +} + +function browserTask() { + return new Promise(async resolve => { + const tasks = $.allTask.filter(x => x.tasklevel !== 6); + const times = Math.max(...[...tasks].map(x => x.limit)); + for (let i = 0; i < tasks.length; i++) { + const task = tasks[i]; + $.log(`开始第${i + 1}个任务:${task.taskname}`); + const status = [0]; + for (let i = 0; i < times; i++) { + const random = Math.random() * 3; + await $.wait(random * 1000); + if (status[0] === 0) { + status[0] = await doTask(task); + } + if (status[0] !== 0) { + break; + } + } + if (status[0] === 1032) { + $.log('任务执行失败,种植的 APP 专属种子,请提供 token 或种植非 APP 种子'); + $.msg($.name, '请参考脚本头部说明获取token', '或者改中非app专属种子,点击通知跳转', option); + if ($.isNode()) { + await notify.sendNotify(`${$.name}`, `京东账号${$.index}[${$.nickName || $.UserName}]请参考脚本头部说明获取token\n或者改中非app专属种子`); + } + resolve(false); + return; + } + + $.log(`结束第${i + 1}个任务:${task.taskname}`); + } + resolve(true); + }); +} + +function answerTask() { + const _answerTask = $.allTask.filter(x => x.tasklevel === 6); + if (!_answerTask || !_answerTask[0]) return; + const {tasklevel, left, taskname, eachtimeget} = _answerTask[0]; + $.log(`准备做答题任务:${taskname}`); + return new Promise(async resolve => { + if (parseInt(left) <= 0) { + resolve(false); + $.log(`${taskname}[做任务]: 任务已完成,跳过`); + return; + } + $.get( + taskUrl( + 'dotask', + `active=${$.info.active}&answer=${$.info.indexday}:${['A', 'B', 'C', 'D'][$.answer]}:0&joinnum=${ + $.info.joinnum + }&tasklevel=${tasklevel}`, + ), + async (err, resp, data) => { + try { + const res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + let {ret, retmsg, right} = JSON.parse(res); + retmsg = retmsg !== '' ? retmsg : '成功'; + $.log(`${taskname}[做任务]:ret:${ret} retmsg:"${retmsg.indexOf('活动太火爆了') !== -1 ? '任务进行中或者未到任务时间' : retmsg}"`); + if (ret === 0 && right === 1) { + $.drip += eachtimeget; + } + if (((ret !== 0 && ret !== 1029) || retmsg === 'ans err') && $.answer < 4) { + $.answer++; + await $.wait(1000); + await answerTask(); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + +function getMessage(endInfo) { + const need = endInfo.target - endInfo.score; + const get = $.drip; + message += `【水滴】获得水滴${get} 还需水滴${need}\n`; +} + +// 提交助力码 +function submitInviteId(userName) { + return new Promise(resolve => { + if (!$.info || !$.info.smp) { + resolve(); + return; + } + $.post( + { + url: `https://api.ninesix.cc/api/jx-nc/${$.info.smp}/${encodeURIComponent(userName)}?active=${$.info.active}`, + }, + (err, resp, _data) => { + try { + const {code, data = {}} = JSON.parse(_data); + $.log(`邀请码提交:${code}`); + if (data.value) { + message += '【邀请码】提交成功!\n'; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + +// 获取随机助力码并助力 +function createAssistUser() { + return new Promise(resolve => { + $.get({url: `https://api.ninesix.cc/api/jx-nc?active=${$.info.active}`}, async (err, resp, _data) => { + try { + const {code, data = {}} = JSON.parse(_data); + $.log(`获取随机助力码 ${code}`); + if (!data.value) { + $.log('随机助力码不存在,跳过助力'); + resolve(); + return; + } + const next = await helpShareCode(data.value); + if (next) { + await createAssistUser(); + } else { + resolve(); + } + } catch (e) { + $.logErr(e, resp); + } + }); + }); +} + +// 为好友助力 return true 继续助力 false 助力结束 +async function helpFriends() { + for (let code of currentShareCode) { + if (!code) { + continue + } + const next = await helpShareCode(code); + if (!next) { + return false; + } + } + return true; +} + +// 执行助力 return true 继续助力 false 助力结束 +function helpShareCode(code) { + return new Promise(async resolve => { + $.get( + taskUrl('help', `active=${$.info.active}&joinnum=${$.info.joinnum}&smp=${code}`), + async (err, resp, data) => { + try { + const res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + const {ret, retmsg = ''} = JSON.parse(res); + $.log(`助力结果:ret=${ret} retmsg="${retmsg ? retmsg : '助力成功'}"`); + if (ret === 0 || ret === 1021) { // 0 助力成功 1021 不能助力自己 + resolve(true); + } + if (ret === 1011) { // 1011 active 不同 + $.helpNum++; + if ($.helpNum <= $.maxHelpNum) { + resolve(true); + } + } + // ret 1016 助力上限 + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(false); + } + }, + ); + }); +} + + +function doTask({tasklevel, left, taskname, eachtimeget}) { + return new Promise(async resolve => { + if (parseInt(left) <= 0) { + $.log(`${taskname}[做任务]: 任务已完成,跳过`); + resolve(false); + } + $.get( + taskUrl( + 'dotask', + `active=${$.info.active}&answer=${$.info.indexday}:D:0&joinnum=${$.info.joinnum}&tasklevel=${tasklevel}`, + ), + (err, resp, data) => { + try { + const res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + let {ret, retmsg} = JSON.parse(res); + retmsg = retmsg !== '' ? retmsg : '成功'; + $.log(`${taskname}[做任务]:ret:${ret} retmsg:"${retmsg.indexOf('活动太火爆了') !== -1 ? '任务进行中或者未到任务时间' : retmsg}"`); + if (ret === 0) { + $.drip += eachtimeget; + } + resolve(ret); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + +function taskUrl(function_path, body) { + return { + url: `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=${currentToken['farm_jstoken']}&phoneid=${currentToken['phoneid']}×tamp=${currentToken['timestamp']}&sceneval=2&g_login_type=1&callback=whyour&_=${Date.now()}&g_ty=ls`, + headers: { + Cookie: currentCookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `wq.jd.com`, + 'Accept-Language': `zh-cn`, + }, + }; +} + +async function showMsg() { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + } +} + +// 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) +} From 69dbec024ae78467ad7fe02fadc857067e2b11b4 Mon Sep 17 00:00:00 2001 From: guyuexuan <2651919937@qq.com> Date: Sun, 10 Jan 2021 14:31:46 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=E6=81=A2=E5=A4=8D=20jx=5Fnc.cookie.js=20?= =?UTF-8?q?url=20=E8=B7=AF=E5=BE=84=20=E6=9C=AC=E6=9D=A5=E6=83=B3=E6=8A=8A?= =?UTF-8?q?=E8=BF=99=E4=B8=AA=20js=20=E4=B8=80=E8=B5=B7=E6=90=AC=E8=BF=90?= =?UTF-8?q?=E7=9A=84=EF=BC=8C=E4=B8=8D=E8=BF=87=E8=BF=99=E4=B8=AA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E5=95=A5=E5=8F=98=E5=8C=96=EF=BC=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E7=94=A8=20hundun=20=E5=BA=93=E7=9A=84=E5=B0=B1?= =?UTF-8?q?=E8=A1=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_jxnc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_jxnc.js b/jd_jxnc.js index 035c2ea3..7c853b5c 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -22,7 +22,7 @@ cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_ =========================Surge============================ 京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=60,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js -京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc_cookie.js +京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js =========================小火箭=========================== 京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true From f094a75f2377366f569f6ef4cdcafbe29c4cf098 Mon Sep 17 00:00:00 2001 From: Young Xu Date: Sun, 10 Jan 2021 17:24:08 +0800 Subject: [PATCH 11/27] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=85=B7=E6=8E=A8?= =?UTF-8?q?=E4=BC=81=E5=BE=AE=E6=8E=A8=E9=80=81/=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sendNotify.js | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/sendNotify.js b/sendNotify.js index 071c6184..d46bf5e9 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -16,7 +16,7 @@ let SCKEY = ''; //此处填你申请的SKEY(具体详见文档 https://cp.xuthus.cc/) //注:此处设置github action用户填写到Settings-Secrets里面(Name输入QQ_SKEY) let QQ_SKEY = ''; -//此处填写私聊或群组推送,默认私聊(send或group或者wx) +//此处填写私聊或群组推送,默认私聊(send[私聊]、group[群聊]、wx[个微]、ww[企微]、email[邮件]) let QQ_MODE = 'send'; // =======================================Bark App通知设置区域=========================================== @@ -196,24 +196,54 @@ function serverNotify(text, desp, timeout = 2100) { function CoolPush(text, desp) { return new Promise(resolve => { if (QQ_SKEY) { - const options = { + let options = { url: `https://push.xuthus.cc/${QQ_MODE}/${QQ_SKEY}`, - body: `${text}\n\n${desp}`, headers: { 'Content-Type': 'application/json' } } + + switch (QQ_MODE) { + case "email": + options.json = { + "t": text, + "c": desp, + }; + break; + default: + options.body = `${text}\n\n${desp}`; + } + + let pushMode = function(t) { + switch (t){ + case "send": + return "个人"; + case "group": + return "QQ群"; + case "wx": + return "微信"; + case "ww": + return "企业微信"; + case "email": + return "邮件"; + default: + return "未知方式" + } + } + $.post(options, (err, resp, data) => { try { if (err) { - console.log(`发送${QQ_MODE === 'send' ? '个人' : QQ_MODE === 'group' ? 'QQ群' : QQ_MODE === 'wx' ? '微信' : ''}通知调用API失败!!\n`) + console.log(`发送${pushMode(QQ_MODE)}通知调用API失败!!\n`) console.log(err); } else { data = JSON.parse(data); if (data.code === 200) { - console.log(`酷推发送${QQ_MODE === 'send' ? '个人' : QQ_MODE === 'group' ? 'QQ群' : QQ_MODE === 'wx' ? '微信' : ''}通知消息成功\n`) + console.log(`酷推发送${pushMode(QQ_MODE)}通知消息成功\n`) } else if (data.code === 400) { - console.log(`QQ酷推(Cool Push)发送${QQ_MODE === 'send' ? '个人' : QQ_MODE === 'group' ? 'QQ群' : QQ_MODE === 'wx' ? '微信' : ''}推送失败:${data.msg}\n`) + console.log(`QQ酷推(Cool Push)发送${pushMode(QQ_MODE)}推送失败:${data.msg}\n`) + }else{ + console.log(`酷推推送异常: ${data.msg}`); } } } catch (e) { From 5784b489e55a878fa5b8179f03741479e47b4569 Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Sun, 10 Jan 2021 18:13:44 +0800 Subject: [PATCH 12/27] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=A3=E8=A2=8B=E4=B9=A6=E5=BA=97?= 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 5e3490bb..efec5764 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_syj_kd_jdzz + name: pigPet_syj_kd_jdzz_bookshop cronExpression: "0 3 1 * * * *" enable: true - argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz + argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz&jd_bookshop environment: # 环境变量 variables: # 环境变量对象 AAA: BBB # 不要删除,用来格式化对齐追加的变量的 From a9a03f3292161c039a5b8e33282dbeebf22a9fed Mon Sep 17 00:00:00 2001 From: any Date: Sun, 10 Jan 2021 18:39:55 +0800 Subject: [PATCH 13/27] =?UTF-8?q?1.=20=E7=BB=99Docker=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=A3=E8=A2=8B=E4=B9=A6=E5=BA=97=E3=80=81=E4=BA=AC=E5=96=9C?= =?UTF-8?q?=E5=86=9C=E5=9C=BA=E7=9A=84=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=9B2.=20=E8=A1=A5=E5=85=85Readme=E7=9A=84=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=98=8E=E7=BB=86=EF=BC=9B3.=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E6=B8=85=E5=8D=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 80 +++++++++++++++++++++++------------------ docker/crontab_list.sh | 4 +++ githubAction.md | 82 +++++++++++++++++++++--------------------- 3 files changed, 91 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 68c4d189..980fde4a 100644 --- a/README.md +++ b/README.md @@ -22,42 +22,52 @@ ## 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上查阅,恕不再另行说明。 +2. 以字母排序。 -| 活动时长 | 名称 | 脚本 | -| ---- | ------------------------------ | -------------------------------------------------------------------------------------------------------- | -| 长期 | 疯狂的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) | +| 活动时长 | 名称 | 脚本 | +| -------- | --------------------------------- | -------------------------------------------------------------------------------------------------------- | +| 长期 | 京豆变动通知 | [jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js) | +| 长期 | 领京豆额外奖励&抢京豆 | [jd_bean_home.js](https://raw.githubusercontent.com/lxk0302/jd_scripts/master/jd_bean_home.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_bookshop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js) | +| 长期 | 京东汽车赛点兑换京豆 | [jd_car_exchange.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js) | +| 长期 | 京东汽车签到 | [jd_car.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js) | +| 长期 | 摇京豆 | [jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js) | +| 长期 | 疯狂的JOY挂机 | [jd_crazy_joy_coin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js) | +| 长期 | 疯狂的JOY日常任务 | [jd_crazy_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js) | +| 长期 | 京东金融-天天提鹅 | [jd_daily_egg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_daily_egg.js) | +| 长期 | 京喜工厂 | [jd_dreamFactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.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_get_share_code.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js) | +| 长期 | 东东工厂 | [jd_jdfactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js) | +| 长期 | 京东赚赚 | [jd_jdzz.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.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_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js) | +| 长期 | 京喜农场 | [jd_jxnc.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js) | +| 长期 | 京东快递签到 | [jd_kd.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js) | +| 长期 | 京东直播 | [jd_live.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js) | +| 长期 | 京东抽奖机 | [jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js) | +| 长期 | 摇钱树 | [jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js) | +| 长期 | 点点券 | [jd_necklace.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.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_plantBean.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js) | +| 长期 | 京东排行榜签到得京豆 | [jd_rankingList.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_rankingList.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_small_home.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js) | +| 长期 | 天天加速 | [jd_speed.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js) | +| 长期 | 东东超市 | [jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js) | +| 长期 | 十元街 | [jd_syj.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js) | +| 长期 | 注销京东会员卡 | [jd_unbind.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js) | +| 长期 | 取关京东店铺和商品 | [jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js) | 搬运脚本 1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js)) diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh index 73dc2ed6..daa50fa0 100644 --- a/docker/crontab_list.sh +++ b/docker/crontab_list.sh @@ -79,3 +79,7 @@ 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 +# 口袋书店 +7 8,12,18 * * * node /scripts/jd_bookshop.js >> /scripts/logs/jd_bookshop.log 2>&1 +# 京喜农场 +0 9,12,18 * * * node /scripts/jd_jxnc.js >> /scripts/logs/jd_jxnc.log 2>&1 diff --git a/githubAction.md b/githubAction.md index 415242ed..f84c0ebe 100644 --- a/githubAction.md +++ b/githubAction.md @@ -35,49 +35,51 @@ ##### 互助码类环境变量 -| Name | 归属 | 属性 | 说明 | -| :---------------------: | :----------: | --------- | ------------------------------------------------------------ | -| `FRUITSHARECODES` | 东东农场互助码 | 非必须 | 填写规则请看 [jdFruitShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFruitShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `PETSHARECODES` | 东东萌宠互助码 | 非必须 | 填写规则请看 [jdPetShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPetShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `PLANT_BEAN_SHARECODES` | 种豆得豆互助码 | 非必须 | 填写规则请看 [jdPlantBeanShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPlantBeanShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `SUPERMARKET_SHARECODES`| 京小超商圈互助码 | 非必须 | 填写规则请看 [jdSuperMarketShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdSuperMarketShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `DDFACTORY_SHARECODES` | 东东工厂互助码 | 非必须 | 填写规则请看 [jdFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFactoryShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `DREAM_FACTORY_SHARE_CODES`| 京喜工厂互助码 | 非必须 | 填写规则请看 [jdDreamFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | -| `JDZZ_SHARECODES` | 京东赚赚(jd_jdzz.js)脚本互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | -| `JDJOY_SHARECODES` | 疯狂的joy(jd_crazy_joy.js)脚本互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| Name | 归属 | 属性 | 说明 | +| --------------------------- | ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `FRUITSHARECODES` | 东东农场互助码 | 非必须 | 填写规则请看[jdFruitShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFruitShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PETSHARECODES` | 东东萌宠互助码 | 非必须 | 填写规则请看[jdPetShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPetShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PLANT_BEAN_SHARECODES` | 种豆得豆互助码 | 非必须 | 填写规则请看[jdPlantBeanShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPlantBeanShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `SUPERMARKET_SHARECODES` | 东东超市商圈互助码 | 非必须 | 填写规则请看[jdSuperMarketShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdSuperMarketShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `DDFACTORY_SHARECODES` | 东东工厂互助码 | 非必须 | 填写规则请看[jdFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `DREAM_FACTORY_SHARE_CODES` | 京喜工厂互助码 | 非必须 | 填写规则请看[jdDreamFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDZZ_SHARECODES` | 京东赚赚互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDJOY_SHARECODES` | 疯狂的JOY互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JXNCSHARECODES` | 京喜农场互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | ##### 控制脚本功能环境变量 -| Name | 归属 | 属性 | 说明 | -| :---------------------: | :----------: | --------- | ------------------------------------------------------------ | -| `JD_BEAN_STOP` | 京东 | 非必须 | `jd_bean_sign.js`自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长),如需填写建议输入数字`1`,详见[此处说明](https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js#L93) | -| `JD_BEAN_SIGN_STOP_NOTIFY`| 京东 | 非必须 | `jd_bean_sign.js`脚本运行后不推送签到结果通知,默认推送,填`true`表示不发送通知 | -| `JD_BEAN_SIGN_NOTIFY_SIMPLE`| 京东 | 非必须 | `jd_bean_sign.js`脚本运行后推送签到结果简洁版通知,默认推送全部签到结果,填`true`表示推送简洁通知,[效果图](./icon/bean_sign_simple.jpg) | -| `PET_NOTIFY_CONTROL` | 东东萌宠推送开关 | 非必须 | 控制京东萌宠是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | -| `FRUIT_NOTIFY_CONTROL` | 东东农场推送开关 | 非必须 | 控制京东农场是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | -| `JD_JOY_REWARD_NOTIFY` | 宠汪汪兑换京豆推送开关 | 非必须 | 控制`jd_joy_reward.js`脚本是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) -| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制`jd_818.js`脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) | -| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制`jd_joy_feedPets.js`脚本喂食数量 ,可以填的数字10,20,40,80 , 其他数字不可. | -| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制`jd_joy_steal.js`脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) | -| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制`jd_joy.js`脚本是否参加赛跑(默认参加双人赛跑),`false`为否,`true`为是,脚本默认是`true` | -| `JOY_TEAM_LEVEL` | 宠汪汪参加什么级别的赛跑 | 非必须 | 控制`jd_joy.js`脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效),如若想设置不同账号参加不同类别的比赛则用&区分即可(如下三个账号:`2&10&50`) | -| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 | -| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制`jd_blueCoin.js`兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` | -| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制`jd_blueCoin.js`兑换奖品成功后是否静默运行, `false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | -| `SUPERMARKET_UPGRADE` | 京小超自动升级 | 非必须 | 自动升级,顺序:解锁升级商品、升级货架,`true`表示自动升级,`false`表示关闭自动升级 | -| `BUSINESS_CIRCLE_JUMP` | 京小超自动更换商圈 | 非必须 | 小于对方300热力值自动更换商圈队伍,`true`表示运行,`false`表示禁止 | -| `SUPERMARKET_LOTTERY` | 京小超抽奖 | 非必须 | 每天运行脚本是否使用金币去抽奖,`true`表示抽奖,`false`表示不抽奖 | -| `FRUIT_BEAN_CARD` | 农场使用水滴换豆卡 | 非必须 | 农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),`true`表示换豆(不浇水),`false`表示不换豆(继续浇水),脚本默认是浇水 | -| `UN_SUBSCRIBES` | jd_unsubscribe.js | 非必须 | 共四个参数,换行隔开. 四个参数分别表示`取关商品数量`,`取关店铺数量`,`遇到此商品不再进行取关`, `遇到此店铺不再进行取关`,[具体使用往下看](#取关店铺secret的说明)| -| `UN_BIND_CARD_NUM` | jd_unbind.js | 非必须 | 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销。此参数控制每次运行脚本时注销多少个店铺会员,默认200。| -| `UN_BIND_STOP_CARD` | jd_unbind.js | 非必须 | 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销。遇到此参数设定的会员卡则跳过不注销,多个会员卡之间以`&`分隔,默认值"京东PLUS会员"。 | -| `JDJOY_HELPSELF` | 疯狂的joy | 非必须 | 疯狂的joy循环助力,`true`表示循环助力,`false`表示不循环助力,默认不开启循环助力。| -| `JDJOY_APPLYJDBEAN` | 疯狂的joy | 非必须 | 疯狂的joy京豆兑换,目前最小值为500/1000京豆,默认不开启京豆兑换。| -| `MONEY_TREE_SELL_FRUIT` | 摇钱树是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`false` | -| `FACTORAY_WANTPRODUCT_NAME` | 东东工厂心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,如不提供则会兑换当前所选商品 | -| `WATCH_ACCEPTBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discAcceptTask`(需40个,每个之间使用@符号隔开) | -| `WATCH_DOBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discDoTask`(需40个,每个之间使用@符号隔开) | - +| Name | 归属 | 属性 | 说明 | +| ---------------------------- | --------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `JD_BEAN_STOP` | 京东 | 非必须 | `jd_bean_sign.js`自定义延迟签到,单位毫秒.默认分批并发无延迟.延迟作用于每个签到接口,如填入延迟则切换顺序签到(耗时较长),如需填写建议输入数字`1`,详见[此处说明](https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js#L93) | +| `JD_BEAN_SIGN_STOP_NOTIFY` | 京东 | 非必须 | `jd_bean_sign.js`脚本运行后不推送签到结果通知,默认推送,填`true`表示不发送通知 | +| `JD_BEAN_SIGN_NOTIFY_SIMPLE` | 京东 | 非必须 | `jd_bean_sign.js`脚本运行后推送签到结果简洁版通知,默认推送全部签到结果,填`true`表示推送简洁通知,[效果图](./icon/bean_sign_simple.jpg) | +| `PET_NOTIFY_CONTROL` | 东东萌宠推送开关 | 非必须 | 控制京东萌宠是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `FRUIT_NOTIFY_CONTROL` | 东东农场推送开关 | 非必须 | 控制京东农场是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JD_JOY_REWARD_NOTIFY` | 宠汪汪兑换京豆推送开关 | 非必须 | 控制`jd_joy_reward.js`脚本是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制`jd_818.js`脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) | +| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制`jd_joy_feedPets.js`脚本喂食数量,可以填的数字10,20,40,80,其他数字不可. | +| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制`jd_joy_steal.js`脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) | +| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制`jd_joy.js`脚本是否参加赛跑(默认参加双人赛跑),`false`为否,`true`为是,脚本默认是`true` | +| `JOY_TEAM_LEVEL` | 宠汪汪参加什么级别的赛跑 | 非必须 | 控制`jd_joy.js`脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效),如若想设置不同账号参加不同类别的比赛则用&区分即可(如下三个账号:`2&10&50`) | +| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 | +| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制`jd_blueCoin.js`兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` | +| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制`jd_blueCoin.js`兑换奖品成功后是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `SUPERMARKET_UPGRADE` | 京小超自动升级 | 非必须 | 自动升级,顺序:解锁升级商品、升级货架,`true`表示自动升级,`false`表示关闭自动升级 | +| `BUSINESS_CIRCLE_JUMP` | 京小超自动更换商圈 | 非必须 | 小于对方300热力值自动更换商圈队伍,`true`表示运行,`false`表示禁止 | +| `SUPERMARKET_LOTTERY` | 京小超抽奖 | 非必须 | 每天运行脚本是否使用金币去抽奖,`true`表示抽奖,`false`表示不抽奖 | +| `FRUIT_BEAN_CARD` | 农场使用水滴换豆卡 | 非必须 | 农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),`true`表示换豆(不浇水),`false`表示不换豆(继续浇水),脚本默认是浇水 | +| `UN_SUBSCRIBES` | jd_unsubscribe.js | 非必须 | 共四个参数,换行隔开.四个参数分别表示`取关商品数量`,`取关店铺数量`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关`,[具体使用往下看](#取关店铺secret的说明) | +| `UN_BIND_CARD_NUM` | jd_unbind.js | 非必须 | 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销。此参数控制每次运行脚本时注销多少个店铺会员,默认200。 | +| `UN_BIND_STOP_CARD` | jd_unbind.js | 非必须 | 注销京东已开的店铺会员,不是注销京东plus会员,个别店铺无法注销。遇到此参数设定的会员卡则跳过不注销,多个会员卡之间以`&`分隔,默认值"京东PLUS会员"。 | +| `JDJOY_HELPSELF` | 疯狂的JOY | 非必须 | 疯狂的JOY循环助力,`true`表示循环助力,`false`表示不循环助力,默认不开启循环助力。 | +| `JDJOY_APPLYJDBEAN` | 疯狂的JOY | 非必须 | 疯狂的JOY京豆兑换,目前最小值为500/1000京豆,默认不开启京豆兑换。 | +| `BUY_JOY_LEVEL` | 疯狂的JOY | 非必须 | 疯狂的JOY自动购买什么等级的JOY | +| `MONEY_TREE_SELL_FRUIT` | 摇钱树是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`false` | +| `FACTORAY_WANTPRODUCT_NAME` | 东东工厂心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,如不提供则会兑换当前所选商品 | +| `WATCH_ACCEPTBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discAcceptTask`(需40个,每个之间使用@符号隔开) | +| `WATCH_DOBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discDoTask`(需40个,每个之间使用@符号隔开) | +| `JXNCTOKENS` | 京喜农场TOKEN | 非必须 | 每个账号 token 是一个 json,示例:{"farm_jstoken":"749a90f871adsfads8ffda7bf3b1576760","timestamp":"1610165423873","phoneid":"42c7e3dadfadsfdsaac-18f0e4f4a0cf"},多账单间使用`&`或换行分开。 | ##### 互助码的填写规则 From 19809233f8845289c9e10582e907da075602482e Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Sun, 10 Jan 2021 18:55:23 +0800 Subject: [PATCH 14/27] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=8F=A3=E8=A2=8B=E4=B9=A6=E5=BA=97=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 云函数调整口袋书店运行时间 --- serverless.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/serverless.yml b/serverless.yml index efec5764..f9c30a18 100644 --- a/serverless.yml +++ b/serverless.yml @@ -28,12 +28,12 @@ inputs: cronExpression: "0 0 0 * * * *" enable: true argument: jd_blueCoin&jd_club_lottery&jd_car&jd_car_exchange - - timer: # 东东农场# 东东萌宠 + - timer: #东东农场 #东东萌宠 #口袋书店 parameters: - name: jd_fruit_jd_pet - cronExpression: "0 5 6-18/6 * * * *" + name: jd_fruit_jd_pet_bookshop + cronExpression: "0 5 6-18/6,8 * * * *" enable: true - argument: jd_fruit&jd_pet + argument: jd_fruit&jd_pet&jd_bookshop - timer: # 宠汪汪喂食# 宠汪汪# 摇钱树# 京东种豆得豆# 京喜工厂 #东东工厂 parameters: name: joy_feedPets_joy_moneyTree_plantBean_dreamFactory_jdfactory @@ -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_syj_kd_jdzz_bookshop + name: pigPet_syj_kd_jdzz cronExpression: "0 3 1 * * * *" enable: true - argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz&jd_bookshop + argument: jd_pigPet&jd_syj&jd_kd&jd_jdzz environment: # 环境变量 variables: # 环境变量对象 AAA: BBB # 不要删除,用来格式化对齐追加的变量的 From 031adf3fc766d46ef8db89891b12c61be7dcaef8 Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Sun, 10 Jan 2021 19:03:37 +0800 Subject: [PATCH 15/27] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=AC=E5=96=9C=E5=86=9C=E5=9C=BAsecret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 云函数增加京喜农场secret --- .github/workflows/deploy_tencent_scf.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy_tencent_scf.yml b/.github/workflows/deploy_tencent_scf.yml index 100db470..714d8a37 100644 --- a/.github/workflows/deploy_tencent_scf.yml +++ b/.github/workflows/deploy_tencent_scf.yml @@ -71,12 +71,14 @@ jobs: 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 [ $JXNCSHARECODES ]; then sed -i "/variables/a\ JXNCSHARECODES: $JXNCSHARECODES" 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; if [ $FACTORAY_WANTPRODUCT_NAME ]; then sed -i "/variables/a\ FACTORAY_WANTPRODUCT_NAME: $FACTORAY_WANTPRODUCT_NAME" serverless.yml; fi; if [ $WATCH_ACCEPTBODY ]; then sed -i "/variables/a\ WATCH_ACCEPTBODY: $WATCH_ACCEPTBODY" serverless.yml; fi; if [ $WATCH_DOBODY ]; then sed -i "/variables/a\ WATCH_DOBODY: $WATCH_DOBODY" serverless.yml; fi; + if [ $JXNCTOKENS ]; then sed -i "/variables/a\ JXNCTOKENS: $JXNCTOKENS" serverless.yml; fi; cat serverless.yml env env: #因为直接读取secrets里面的值很多字符不会自动转译,导致写入serverless.yml异常,所以设置到环境变量,在读取环境变量转译过的值 @@ -126,12 +128,14 @@ jobs: DREAM_FACTORY_SHARE_CODES: ${{ secrets.DREAM_FACTORY_SHARE_CODES}} JDZZ_SHARECODES: ${{ secrets.JDZZ_SHARECODES}} JDJOY_SHARECODES: ${{ secrets.JDJOY_SHARECODES}} + JXNCSHARECODES: ${{ secrets.JXNCSHARECODES}} TG_PROXY_HOST: ${{ secrets.TG_PROXY_HOST}} TG_PROXY_PORT: ${{ secrets.TG_PROXY_PORT}} MONEY_TREE_SELL_FRUIT: ${{ secrets.MONEY_TREE_SELL_FRUIT}} FACTORAY_WANTPRODUCT_NAME: ${{ secrets.FACTORAY_WANTPRODUCT_NAME}} WATCH_ACCEPTBODY: ${{ secrets.WATCH_ACCEPTBODY}} WATCH_DOBODY: ${{ secrets.WATCH_DOBODY}} + JXNCTOKENS: ${{ secrets.JXNCTOKENS}} - name: "部署到腾讯云函数" run: serverless deploy From 98568da7b07d3daf35b8441dac3acb119c4d43af Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Sun, 10 Jan 2021 20:06:43 +0800 Subject: [PATCH 16/27] Update jd_car_exchange.js --- jd_car_exchange.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jd_car_exchange.js b/jd_car_exchange.js index b5460641..cf872dbe 100644 --- a/jd_car_exchange.js +++ b/jd_car_exchange.js @@ -7,22 +7,23 @@ 活动网页地址: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个京东账号 +已支持IOS, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js + ============Quantumultx=============== [task_local] #京东汽车兑换 -0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange, tag=京东汽车兑换 +cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换 ===============Surge================= -京东汽车兑换 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange +京东汽车兑换 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=2000,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js ============小火箭========= -京东汽车兑换 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange, cronexpr="0 0 * * *", timeout=200, enable=true +京东汽车兑换 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, cronexpr="0 0 * * *", timeout=2000, enable=true */ const $ = new Env('京东汽车兑换'); From 22db3b3cd58f1afb65a67ed52c1f446b5c60b073 Mon Sep 17 00:00:00 2001 From: guyuexuan <2651919937@qq.com> Date: Sun, 10 Jan 2021 22:53:58 +0800 Subject: [PATCH 17/27] =?UTF-8?q?fix=20=E5=8A=A9=E5=8A=9B=E7=A0=81?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E9=94=99=E8=AF=AF=20add=20=E9=A2=84=E6=B5=8B?= =?UTF-8?q?=E6=88=90=E7=86=9F=E8=BF=98=E9=9C=80=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_jxnc.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/jd_jxnc.js b/jd_jxnc.js index 7c853b5c..1bef74f8 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -4,7 +4,7 @@ 感谢 @whyour 大佬 京喜农场:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js -更新时间:2021-01-09 20:46:10 +更新时间:2021-01-10 22:47:51 东东农场活动链接:https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2 已支持IOS双京东账号,Node.js支持N个京东账号 理论上脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js @@ -127,8 +127,8 @@ function requireConfig() { if ($.isNode()) { Object.keys(jdJxncShareCodeNode).forEach((item) => { - if (jxncShareCodeArr[item]) { - jxncShareCodeArr.push(jxncShareCodeArr[item]) + if (jdJxncShareCodeNode[item]) { + jxncShareCodeArr.push(jdJxncShareCodeNode[item]) } }) } @@ -249,7 +249,7 @@ function getTaskList() { try { const res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; const {detail, msg, task = [], retmsg, ...other} = JSON.parse(res); - $.helpTask = task.filter(x => x.tasktype === 2)[0]; + $.helpTask = task.filter(x => x.tasktype === 2)[0] || { eachtimeget: 0, limit: 0 }; $.allTask = task.filter(x => x.tasktype !== 3 && x.tasktype !== 2 && parseInt(x.left) > 0); $.info = other; $.log(`获取任务列表 ${retmsg} 总共${$.allTask.length}个任务!`); @@ -351,6 +351,11 @@ function getMessage(endInfo) { const need = endInfo.target - endInfo.score; const get = $.drip; message += `【水滴】获得水滴${get} 还需水滴${need}\n`; + if (get > 0) { + const max = parseInt(need / get); + const min = parseInt(need / (get + $.helpTask.limit * $.helpTask.eachtimeget)); + message += `【预测】还需 ${min} ~ ${max} 天\n`; + } } // 提交助力码 From 059bb0a3b9db938811ec601d6a9ae4a5fe54e3d5 Mon Sep 17 00:00:00 2001 From: guyuexuan <2651919937@qq.com> Date: Sun, 10 Jan 2021 23:13:47 +0800 Subject: [PATCH 18/27] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E4=B8=BA=20=20JXNC=5FSHARECODES=20?= =?UTF-8?q?=EF=BC=88=E5=8E=9F=20JXNCSHARECODES=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_tencent_scf.yml | 4 ++-- githubAction.md | 2 +- jdJxncShareCodes.js | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_tencent_scf.yml b/.github/workflows/deploy_tencent_scf.yml index 714d8a37..b375b6f0 100644 --- a/.github/workflows/deploy_tencent_scf.yml +++ b/.github/workflows/deploy_tencent_scf.yml @@ -71,7 +71,7 @@ jobs: 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 [ $JXNCSHARECODES ]; then sed -i "/variables/a\ JXNCSHARECODES: $JXNCSHARECODES" serverless.yml; fi; + if [ $JXNC_SHARECODES ]; then sed -i "/variables/a\ JXNC_SHARECODES: $JXNC_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; @@ -128,7 +128,7 @@ jobs: DREAM_FACTORY_SHARE_CODES: ${{ secrets.DREAM_FACTORY_SHARE_CODES}} JDZZ_SHARECODES: ${{ secrets.JDZZ_SHARECODES}} JDJOY_SHARECODES: ${{ secrets.JDJOY_SHARECODES}} - JXNCSHARECODES: ${{ secrets.JXNCSHARECODES}} + JXNC_SHARECODES: ${{ secrets.JXNC_SHARECODES}} TG_PROXY_HOST: ${{ secrets.TG_PROXY_HOST}} TG_PROXY_PORT: ${{ secrets.TG_PROXY_PORT}} MONEY_TREE_SELL_FRUIT: ${{ secrets.MONEY_TREE_SELL_FRUIT}} diff --git a/githubAction.md b/githubAction.md index f84c0ebe..2d685a34 100644 --- a/githubAction.md +++ b/githubAction.md @@ -45,7 +45,7 @@ | `DREAM_FACTORY_SHARE_CODES` | 京喜工厂互助码 | 非必须 | 填写规则请看[jdDreamFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | | `JDZZ_SHARECODES` | 京东赚赚互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | | `JDJOY_SHARECODES` | 疯狂的JOY互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | -| `JXNCSHARECODES` | 京喜农场互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JXNC_SHARECODES` | 京喜农场互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | ##### 控制脚本功能环境变量 diff --git a/jdJxncShareCodes.js b/jdJxncShareCodes.js index 48d1856a..7f9f85da 100644 --- a/jdJxncShareCodes.js +++ b/jdJxncShareCodes.js @@ -13,15 +13,15 @@ let JxncShareCodes = [ '',//账号二的好友shareCode,不同好友中间用@符号隔开 ] // 判断github action里面是否有京喜农场助力码 -if (process.env.JXNCSHARECODES) { - if (process.env.JXNCSHARECODES.indexOf('&') > -1) { +if (process.env.JXNC_SHARECODES) { + if (process.env.JXNC_SHARECODES.indexOf('&') > -1) { console.log(`您的京喜农场助力码选择的是用&隔开\n`) - JxncShareCodes = process.env.JXNCSHARECODES.split('&'); - } else if (process.env.JXNCSHARECODES.indexOf('\n') > -1) { + JxncShareCodes = process.env.JXNC_SHARECODES.split('&'); + } else if (process.env.JXNC_SHARECODES.indexOf('\n') > -1) { console.log(`您的京喜农场助力码选择的是用换行隔开\n`) - JxncShareCodes = process.env.JXNCSHARECODES.split('\n'); + JxncShareCodes = process.env.JXNC_SHARECODES.split('\n'); } else { - JxncShareCodes = process.env.JXNCSHARECODES.split(); + JxncShareCodes = process.env.JXNC_SHARECODES.split(); } } else if (process.env.JD_COOKIE) { // console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) From 1c1125a79d054af58fd09f3b44155d3422459872 Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Sun, 10 Jan 2021 23:46:20 +0800 Subject: [PATCH 19/27] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=BA=AC=E5=96=9C=E5=86=9C=E5=9C=BAactive=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_get_share_code.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jd_get_share_code.js b/jd_get_share_code.js index 83b52a7c..0262d675 100644 --- a/jd_get_share_code.js +++ b/jd_get_share_code.js @@ -321,8 +321,13 @@ function getJxNc(){ if (safeGet(data)) { data = JSON.parse(data); if (data["ret"] === 0) { - console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场助力码】${data["smp"]}`); - console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场active】 ${$.info.active}`); + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场助力码】${data.smp}`); + + if (data.active) { + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场active】 ${data.active}`); + } else { + console.log( `【账号${$.index}(${$.nickName || $.UserName})京喜农场未选择种子,请先去京喜农场选择种子`); + } } } else { console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`); @@ -422,7 +427,7 @@ async function getJdZZ() { data = JSON.parse(data); if (data.data.shareTaskRes) { console.log(`【账号${$.index}(${$.nickName || $.UserName})京东赚赚】${data.data.shareTaskRes.itemId}`); - } else { + } else { //console.log(`已满5人助力,暂时看不到您的京东赚赚好友助力码`) } } From 4bbeee43416ed587c32b78069ce4035615de02fc Mon Sep 17 00:00:00 2001 From: wangsq <358009775@qq.com> Date: Mon, 11 Jan 2021 00:27:16 +0800 Subject: [PATCH 20/27] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_get_share_code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_get_share_code.js b/jd_get_share_code.js index 0262d675..2d0f7749 100644 --- a/jd_get_share_code.js +++ b/jd_get_share_code.js @@ -324,9 +324,9 @@ function getJxNc(){ console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场助力码】${data.smp}`); if (data.active) { - console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场active】 ${data.active}`); + console.log(`【账号${$.index}(${$.nickName || $.UserName})京喜农场active】${data.active}`); } else { - console.log( `【账号${$.index}(${$.nickName || $.UserName})京喜农场未选择种子,请先去京喜农场选择种子`); + console.log( `【账号${$.index}(${$.nickName || $.UserName})京喜农场】未选择种子,请先去京喜农场选择种子`); } } } else { From fcfed15b7fe32e6c0e0b5d02ba2273e810611346 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Mon, 11 Jan 2021 08:38:32 +0800 Subject: [PATCH 21/27] Update jd_jxnc.js --- jd_jxnc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_jxnc.js b/jd_jxnc.js index 1bef74f8..04e78a7f 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -17,12 +17,12 @@ ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask url script-request-header https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js =========================Loon============================= [Script] -http-request ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc_cookie.js, requires-body=false, timeout=10, tag=京喜农场cookie +http-request ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js, requires-body=false, timeout=10, tag=京喜农场cookie cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js,tag=京喜农场 =========================Surge============================ 京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=60,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js -京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js +京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path= https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js =========================小火箭=========================== 京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true From 8bd1d1cf8978de084afcc7331c358a2ccbd1c330 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Mon, 11 Jan 2021 08:52:33 +0800 Subject: [PATCH 22/27] Update jd_jxnc.js --- jd_jxnc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jd_jxnc.js b/jd_jxnc.js index 04e78a7f..f9906e6a 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -26,6 +26,7 @@ cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_ =========================小火箭=========================== 京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true +京喜农场APP种子cookie = type=http-request,script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,max-size=131072,timeout=110,enable=true */ From 72c8aeb7e28a3634f633d002b7215f106449d960 Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Mon, 11 Jan 2021 09:28:20 +0800 Subject: [PATCH 23/27] update iCloud.md update iCloud.md --- backUp/iCloud.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/backUp/iCloud.md b/backUp/iCloud.md index 22696205..d17725e1 100644 --- a/backUp/iCloud.md +++ b/backUp/iCloud.md @@ -155,17 +155,17 @@ let CookieJDs = [ | `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_bookshop` | 口袋书店 | 长期 | / | / | 5 6-18/6,8 * * * | | `jd_car` | 京东汽车 | 长期 | / | 0 0 */1 * * | 0 0 * * * | +| `jd_car_exchange` | 京东汽车兑换 | 长期 | / | / | 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_fruit` | 东东农场 | 长期 | 20 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6,8 * * * | +| `jd_get_share_code` | 获取互助码 | 长期 | / | / | / | | `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 * * * | @@ -173,14 +173,13 @@ let CookieJDs = [ | `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_jxnc` | 京喜农场 | 长期 | / | / | / | | `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_pet` | 东东萌宠 | 长期 | 35 23,4,10 * * * | 0,5,10 8,9,12,18,23,0 * * * | 5 6-18/6,8 * * * | | `jd_petTreasureBox` | 宠汪汪聚宝盆 | 长期 | / | / | / | | `jd_pigPet` | 京东金融-养猪猪 | 长期 | / | 0-12/3 */3 * * * | 3 1 * * * | | `jd_plantBean` | 种豆得豆 | 长期 | 0 23,0-14/1 * * * | 0-12/3 */3 * * * | 3 */1 * * * | @@ -193,16 +192,21 @@ let CookieJDs = [ | `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_ds` | 京东代属(校园用户) | 短期 | / | / | / | +| `jd_health` | 健康抽奖机 | 短期 | / | 0 0 */1 * * | 10 0 * * * | +| `jd_jdh` | 京东健康APP | 短期 | / | / | 30 7 * * * | | `jd_jxstory` | 京喜故事 | 短期 | / | / | / | +| `jd_live_redrain` | 超级直播间红包雨 | 短期 | / | 0 0,20,9-23/2 * * MON-FRI | / | | `jd_mohe` | 热8超级魔盒 | 短期 | / | / | / | +| `jd_ms_redrain` | 秒杀红包雨 | 短期 | / | 0 1 */1 * * | 10 0 * * * | | `jd_pubg` | PUBG | 短期 | / | / | / | | `jd_split` | 金榜年终奖 | 短期 | / | / | / | +| `jd_watch` | 发现-看一看 | 短期 | / | / | 3 1 * * * | | `jd_xtg` | 双十一星推官 | 短期 | 0 16 * * * | 0 0 */1 * * | / | +| `jr_sign` | 金融打卡年终奖 | 短期 | / | / | 3 1 * * * | 点击提交,所有流程就结束了。 From 804154fe991dd25407945f83686fac87be1d0052 Mon Sep 17 00:00:00 2001 From: an0na <913314010@qq.com> Date: Mon, 11 Jan 2021 10:09:19 +0800 Subject: [PATCH 24/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=8A=A9=E5=8A=9B=E7=A0=81=E3=80=90BOOKSHOP=5FSHARECO?= =?UTF-8?q?DES=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_bookshop.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jd_bookshop.js b/jd_bookshop.js index 3d3a9242..2e31ccfb 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -690,6 +690,14 @@ function requireConfig() { console.log(`共${cookiesArr.length}个京东账号\n`); $.shareCodesArr = []; if ($.isNode()) { + //自定义助力码 + if (process.env.BOOKSHOP_SHARECODES) { + if (process.env.BOOKSHOP_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.BOOKSHOP_SHARECODES.split('\n'); + } else { + shareCodes = process.env.BOOKSHOP_SHARECODES.split('&'); + } + } Object.keys(shareCodes).forEach((item) => { if (shareCodes[item]) { $.shareCodesArr.push(shareCodes[item]) From 99c509fff24278af53d4f1110fe292da4855ab02 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Mon, 11 Jan 2021 10:22:50 +0800 Subject: [PATCH 25/27] fix --- jd_bookshop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_bookshop.js b/jd_bookshop.js index 2e31ccfb..179e3ced 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -686,7 +686,7 @@ function requireConfig() { return new Promise(resolve => { console.log(`开始获取${$.name}配置文件\n`); //Node.js用户请在jdCookie.js处填写京东ck; - const shareCodes = [] + let shareCodes = [] console.log(`共${cookiesArr.length}个京东账号\n`); $.shareCodesArr = []; if ($.isNode()) { From 6df9ebed31bddbdf789656b55d2fa361df472815 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Mon, 11 Jan 2021 10:26:32 +0800 Subject: [PATCH 26/27] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=96=87=E6=A1=A3=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?BOOKSHOP=5FSHARECODES(=E4=BA=AC=E4=B8=9C=E4=B9=A6=E5=BA=97)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- githubAction.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/githubAction.md b/githubAction.md index 2d685a34..3ae06b28 100644 --- a/githubAction.md +++ b/githubAction.md @@ -45,7 +45,8 @@ | `DREAM_FACTORY_SHARE_CODES` | 京喜工厂互助码 | 非必须 | 填写规则请看[jdDreamFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | | `JDZZ_SHARECODES` | 京东赚赚互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | | `JDJOY_SHARECODES` | 疯狂的JOY互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | -| `JXNC_SHARECODES` | 京喜农场互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `BOOKSHOP_SHARECODES` | 京东书店互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JXNC_SHARECODES` | 京喜农场互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | ##### 控制脚本功能环境变量 @@ -77,8 +78,6 @@ | `BUY_JOY_LEVEL` | 疯狂的JOY | 非必须 | 疯狂的JOY自动购买什么等级的JOY | | `MONEY_TREE_SELL_FRUIT` | 摇钱树是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`false` | | `FACTORAY_WANTPRODUCT_NAME` | 东东工厂心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,如不提供则会兑换当前所选商品 | -| `WATCH_ACCEPTBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discAcceptTask`(需40个,每个之间使用@符号隔开) | -| `WATCH_DOBODY` | 京东看一看(jd_watch.js)脚本 | 非必须 | 抓包`functionId=discDoTask`(需40个,每个之间使用@符号隔开) | | `JXNCTOKENS` | 京喜农场TOKEN | 非必须 | 每个账号 token 是一个 json,示例:{"farm_jstoken":"749a90f871adsfads8ffda7bf3b1576760","timestamp":"1610165423873","phoneid":"42c7e3dadfadsfdsaac-18f0e4f4a0cf"},多账单间使用`&`或换行分开。 | ##### 互助码的填写规则 From 73b240c38bce970c4bb54f08f9c9523bc0ad7f4f Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Mon, 11 Jan 2021 10:27:27 +0800 Subject: [PATCH 27/27] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=A3=E8=A2=8B=E4=B9=A6=E5=BA=97secret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 云函数增加口袋书店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 b375b6f0..92f0db0c 100644 --- a/.github/workflows/deploy_tencent_scf.yml +++ b/.github/workflows/deploy_tencent_scf.yml @@ -72,6 +72,7 @@ jobs: 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 [ $JXNC_SHARECODES ]; then sed -i "/variables/a\ JXNC_SHARECODES: $JXNC_SHARECODES" serverless.yml; fi; + if [ $BOOKSHOP_SHARECODES ]; then sed -i "/variables/a\ BOOKSHOP_SHARECODES: $BOOKSHOP_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; @@ -129,6 +130,7 @@ jobs: JDZZ_SHARECODES: ${{ secrets.JDZZ_SHARECODES}} JDJOY_SHARECODES: ${{ secrets.JDJOY_SHARECODES}} JXNC_SHARECODES: ${{ secrets.JXNC_SHARECODES}} + BOOKSHOP_SHARECODES: ${{ secrets.BOOKSHOP_SHARECODES}} TG_PROXY_HOST: ${{ secrets.TG_PROXY_HOST}} TG_PROXY_PORT: ${{ secrets.TG_PROXY_PORT}} MONEY_TREE_SELL_FRUIT: ${{ secrets.MONEY_TREE_SELL_FRUIT}}