This commit is contained in:
Faker 2022-06-20 10:21:35 +08:00
parent 644ba1e912
commit 983faad7ed
8 changed files with 236 additions and 167 deletions

View File

@ -291,6 +291,7 @@ if(DisableIndex!=-1){
EnableJoyRun=false
}
//E卡查询
let EnableCheckEcard=true;
DisableIndex=strDisableList.findIndex((item) => item === "E卡查询");
if(DisableIndex!=-1){
@ -298,6 +299,14 @@ if(DisableIndex!=-1){
EnableCheckEcard=false
}
//京豆收益查询
let EnableCheckBean=true;
DisableIndex=strDisableList.findIndex((item) => item === "京豆收益");
if(DisableIndex!=-1){
console.log("检测到设定关闭京豆收益查询");
EnableCheckBean=false
}
!(async() => {
if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {
@ -681,7 +690,7 @@ async function showMsg() {
}
}
if (EnableCheckBean) {
ReturnMessage += `【今日京豆】收${$.todayIncomeBean}`;
strsummary += `【今日京豆】收${$.todayIncomeBean}`;
if ($.todayOutcomeBean != 0) {
@ -696,6 +705,8 @@ async function showMsg() {
ReturnMessage += `,支${$.expenseBean}`;
}
ReturnMessage += `\n`;
}
if ($.beanCount){
ReturnMessage += `【当前京豆】${$.beanCount-$.beanChangeXi}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
@ -1014,6 +1025,7 @@ async function showMsg() {
//$.msg($.name, '', ReturnMessage , {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"});
}
async function bean() {
if (EnableCheckBean) {
// console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`);
// console.log(`北京时间2020-10-28 06:16:05::${new Date("2020/10/28 06:16:05+08:00").getTime()}`)
// 不管哪个时区。得到都是当前时刻北京时间的时间戳 new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000
@ -1090,6 +1102,7 @@ async function bean() {
}
}
}
}
await redPacket();
if (EnableChaQuan)
await getCoupon();

File diff suppressed because one or more lines are too long

View File

@ -3,14 +3,14 @@
============Quantumultx===============
[task_local]
#店铺签到
15 2,14 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js, tag=店铺签到, enabled=true
15 2,14 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js, tag=店铺签到, enabled=true
===========Loon============
[Script]
cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js,tag=店铺签到
cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js,tag=店铺签到
============Surge=============
店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js
店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js
===========小火箭========
店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true
店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true
*/
const $ = new Env('店铺签到');
const notify = $.isNode() ? require('./sendNotify') : '';
@ -25,26 +25,25 @@ let vender=''
let num=0
let shopname=''
const token = [
"3169D909A54B89AD9365CA5D6DEAE7AE",
"4BE1B58FE1360409A5967CAD1127B5A8",
"C3BACB3B2B01C4CE1773FAA4D527C558",
"9B5EA7F650F292C58811CBF49FB60B2B",
"DBD58C7DDEB7D5EE3E99C164755C0BEE",
"3B27B2B9E70249C339D66F27B7E133F0",
"83E3C2227A9EEF3CC3A427DD79CB9902",
"7900C792CFD20EE96EA96A72D652E664",
"979F3F329012E8BE0D64DA1B7D6F024B",
"342934FF29611CB62EF78EB90CB0AB29",
"EF7855941D2146593FA7411F7994AB4D",
"7BDE362C7EC7AD46016A58A0782254C5",
"1C963AA3BBBD0396784BD0CA527BCDF8",
"C5FD1482A207F2CC65570F8FBC492C9A",
"5CF1A3455369BDB3D1153D9FC974CAFA",
"E29627AF30D59CF7FE7B01C63BD9A975",
"6456528318873762DF731CE5CC4C1DAF",
"22E454E7DA34CBA96DFAB150C2882193",
"67A72DF4DCE945E561051B08A48594A9",
"CAA0FA07FE5FE40329504208C891CF06",
"7C54AE28BAEDCBB8C927768AE71CA0EF",
"809569E3816B2C76210BFF8DB3F2766E",
"3B864BF96848A44E170A26D2791E0AE3",
"0CB602BF5179A3A4670621F3F83C494E",
"7D7E23BB728C9D7425C776BDC8943D10",
"9F75D813CBE3D1F9B146F002FEA4FF2D"
"46D8CB32794AB8EA1F42E83360918961"
]
if ($.isNode()) {

File diff suppressed because one or more lines are too long

30
jd_jinggengjcq_dapainew_task.js Executable file

File diff suppressed because one or more lines are too long

10
jd_mpdz.js Executable file

File diff suppressed because one or more lines are too long

View File

@ -5,17 +5,17 @@
===============Quantumultx===============
[task_local]
#众筹许愿池
40 0,2 * * * https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
40 0,2 * * * https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
================Loon==============
[Script]
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js,tag=众筹许愿池
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js,tag=众筹许愿池
===============Surge=================
众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js
众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js
============小火箭=========
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
*/
const $ = new Env('众筹许愿池');
const notify = $.isNode() ? require('./sendNotify') : '';
@ -25,8 +25,8 @@ let message = '', allMessage = '';
//IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [], cookie = '';
const JD_API_HOST = 'https://api.m.jd.com/client.action';
let appIdArr = ["1EFNUwqeO",'1EFNVyqeH','1FFVQyqw','1EFRWxKuG', '1E1xZy6s'];
let appNameArr = ['互动抽豪礼','京东电器','1111点心动','许愿抽好礼', 'PLUS生活特权'];
let appIdArr = ['1EFNVyqeH','1FFVQyqw','1EFRWxKuG', '1E1xZy6s'];
let appNameArr = ['京东电器','1111点心动','许愿抽好礼', 'PLUS生活特权'];
let appId, appName;
$.shareCode = [];
if ($.isNode()) {
@ -72,12 +72,7 @@ if ($.isNode()) {
if ($.isNode()) await notify.sendNotify($.name, allMessage);
$.msg($.name, '', allMessage)
}
let res = await getAuthorShareCode('https://raw.githubusercontent.com/222222/11111128/master/shareCodes/11111127')
if (!res) {
$.http.get({url: 'https://purge.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
await $.wait(1000)
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127')
}
let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/wish.json')
$.shareCode = [...$.shareCode, ...(res || [])]
for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) {
@ -136,7 +131,6 @@ async function jd_wish() {
await interact_template_getLotteryResult()
await $.wait(2000)
}
if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`
} catch (e) {
$.logErr(e)
@ -145,6 +139,7 @@ async function jd_wish() {
async function healthyDay_getHomeData(type = true) {
return new Promise(async resolve => {
// console.log(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }));
$.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => {
try {
if (err) {
@ -153,25 +148,58 @@ async function healthyDay_getHomeData(type = true) {
} else {
if (safeGet(data)) {
data = JSON.parse(data);
// console.log(data);
if (type) {
for (let key of Object.keys(data.data.result.hotTaskVos).reverse()) {
let vo = data.data.result.hotTaskVos[key]
if (vo.status !== 2) {
if (vo.taskType === 13 || vo.taskType === 12) {
console.log(`点击热区`)
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
} else {
console.log(`${vo.taskName}】已完成\n`)
}
}
}
for (let key of Object.keys(data.data.result.taskVos).reverse()) {
let vo = data.data.result.taskVos[key]
if (vo.status !== 2 && vo.status !== 0) {
if (vo.status !== 2) {
if (vo.taskType === 13 || vo.taskType === 12) {
console.log(`签到`)
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
} else if (vo.taskType === 1) {
$.complete = false;
for (let key of Object.keys(vo.followShopVo)) {
let followShopVo = vo.followShopVo[key]
if (followShopVo.status !== 2) {
console.log(`${followShopVo.shopName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break;
}
}
} else if (vo.taskType === 5) {
for (let key of Object.keys(vo.browseShopVo)) {
let browseShopVo = vo.browseShopVo[key]
if (browseShopVo.status !== 2) {
console.log(`${browseShopVo.skuName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
}
}
} else if (vo.taskType === 15) {
for (let key of Object.keys(vo.productInfoVos)) {
let productInfoVos = vo.productInfoVos[key]
if (productInfoVos.status !== 2) {
console.log(`${productInfoVos.skuName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
}
}
} else if (vo.taskType === 3) {
for (let key of Object.keys(vo.shoppingActivityVos)) {
let shoppingActivityVos = vo.shoppingActivityVos[key]
if (shoppingActivityVos.status !== 2) {
console.log(`${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
}
}
} else if (vo.taskType === 8) {
$.complete = false;
for (let key of Object.keys(vo.productInfoVos)) {
let productInfoVos = vo.productInfoVos[key]
if (productInfoVos.status !== 2) {
@ -179,11 +207,12 @@ async function healthyDay_getHomeData(type = true) {
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" })
await $.wait(vo.waitDuration * 1000)
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break;
}
}
} else if (vo.taskType === 27 && vo.taskId === 18) {
console.log(`${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": vo.productInfoVos[0].taskToken, "taskId": vo.taskId, "actionType": "0" })
} else if (vo.taskType === 9 || vo.taskType === 26) {
$.complete = false;
for (let key of Object.keys(vo.shoppingActivityVos)) {
let shoppingActivityVos = vo.shoppingActivityVos[key]
if (shoppingActivityVos.status !== 2) {
@ -193,7 +222,6 @@ async function healthyDay_getHomeData(type = true) {
await $.wait(vo.waitDuration * 1000)
}
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break;
}
}
} else if (vo.taskType === 14) {
@ -234,7 +262,7 @@ function harmony_collectScore(body = {}, taskType = '') {
if (data && data.data && data.data.bizCode === 0) {
if (taskType === 13) {
console.log(`签到成功:获得${data.data.result.score}金币\n`)
} else if (body.taskId == 6) {
} else if (body.taskId == 5) {
console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`)
} else {
console.log(`完成任务:获得${data.data.result.score}金币\n`)
@ -242,13 +270,12 @@ function harmony_collectScore(body = {}, taskType = '') {
} else {
if (taskType === 13) {
console.log(`签到失败:${data.data.bizMsg}\n`)
} else if (body.taskId == 6) {
} else if (body.taskId == 5) {
console.log(`助力失败:${data.data.bizMsg || data.msg}\n`)
if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false
if (data.data.bizCode === 103) $.delcode = true
} else {
console.log(body.actionType === "0" ? `完成任务失败:${data.data.bizMsg}\n` : data.data.bizMsg)
if (data.data.bizMsg === "任务已完成") $.complete = true;
}
}
}
@ -261,6 +288,7 @@ function harmony_collectScore(body = {}, taskType = '') {
})
})
}
function interact_template_getLotteryResult() {
return new Promise(resolve => {
$.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => {

13
jd_wxSecond.js Normal file

File diff suppressed because one or more lines are too long