This commit is contained in:
Faker
2022-04-14 15:39:19 +08:00
parent 66a2a8430b
commit 1a0cc92eed
10 changed files with 39 additions and 4591 deletions

BIN
.DS_Store vendored

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -69,11 +69,10 @@ if (UidFileexists) {
var tempptpin = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
var intSeq = inArray(tempptpin, arrEnvPtPin);
if (intSeq != -1) {
intSeq += 1;
arrCkPtPin.push(tempptpin);
strCk += "【"+intSeq + "】" + tempptpin ;
if (arrEnvOnebyOne[i]) {
strCk += "(账号已启用一对一推送)"
strCk += "【"+(intSeq+1) + "】" + tempptpin ;
if (arrEnvOnebyOne[intSeq]) {
strCk += "(已启用一对一推送)"
}
strCk +="\n";
}
@@ -86,14 +85,14 @@ if (UidFileexists) {
if (intSeq == -1) {
strNoFoundCk += "【" + (i + 1) + "】" + tempptpin;
if (arrEnvStatus[i] == 1) {
strNoFoundCk += "(状态已禁用)"
strNoFoundCk += "(已禁用)"
if ($.isNode() && WP_APP_TOKEN_ONE) {
await notify.sendNotifybyWxPucher("账号下线通知", strNotify, tempptpin);
await $.wait(1000);
}
}
if (arrEnvOnebyOne[i]) {
strNoFoundCk += "(账号已启用一对一推送)"
strNoFoundCk += "(已启用一对一推送)"
}
strNoFoundCk += "\n";
@@ -118,7 +117,7 @@ if (UidFileexists) {
function inArray(search, array) {
var lnSeq = -1;
for (var i in array) {
for (let i = 0; i < array.length; i++) {
if (array[i] == search) {
lnSeq = i;
}
@@ -126,6 +125,7 @@ function inArray(search, array) {
return parseInt(lnSeq);
}
function getuuid(strRemark, PtPin) {
var strTempuuid = "";
if (strRemark) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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/KingRan/JDJB/main/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/222222/sync/jd_scripts/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/KingRan/JDJB/main/jd_wish.js,tag=众筹许愿池
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js,tag=众筹许愿池
===============Surge=================
众筹许愿池 = 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,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js
============小火箭=========
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/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 = ['1FFVQyqw','1EFRWxKuG', '1E1xZy6s'];
let appNameArr = ['1111点心动','许愿抽好礼', 'PLUS生活特权'];
let appIdArr = ['1EFBTxa6H','1FFVQyqw','1EFRWxKuG', '1E1xZy6s'];
let appNameArr = ['森林历险记','1111点心动','许愿抽好礼', 'PLUS生活特权'];
let appId, appName;
$.shareCode = [];
if ($.isNode()) {
@@ -72,7 +72,12 @@ if ($.isNode()) {
if ($.isNode()) await notify.sendNotify($.name, allMessage);
$.msg($.name, '', allMessage)
}
let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/wish.json')
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')
}
$.shareCode = [...$.shareCode, ...(res || [])]
for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) {
@@ -131,6 +136,7 @@ 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)
@@ -139,7 +145,6 @@ 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) {
@@ -148,50 +153,25 @@ 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 === 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) {
if (vo.status !== 2 && vo.status !== 0) {
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"})
}
}
} 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" })
if ($.complete) break;
}
}
} else if (vo.taskType === 8) {
$.complete = false;
for (let key of Object.keys(vo.productInfoVos)) {
let productInfoVos = vo.productInfoVos[key]
if (productInfoVos.status !== 2) {
@@ -199,12 +179,11 @@ 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) {
@@ -214,6 +193,7 @@ 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) {
@@ -254,7 +234,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 == 5) {
} else if (body.taskId == 6) {
console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`)
} else {
console.log(`完成任务:获得${data.data.result.score}金币\n`)
@@ -262,12 +242,13 @@ function harmony_collectScore(body = {}, taskType = '') {
} else {
if (taskType === 13) {
console.log(`签到失败:${data.data.bizMsg}\n`)
} else if (body.taskId == 5) {
} else if (body.taskId == 6) {
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;
}
}
}
@@ -280,7 +261,6 @@ function harmony_collectScore(body = {}, taskType = '') {
})
})
}
function interact_template_getLotteryResult() {
return new Promise(resolve => {
$.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => {