更新iOS端3大软件订阅配置 by lxk0301 Github Action

This commit is contained in:
lxk0301
2021-01-24 06:44:49 +00:00
8 changed files with 483 additions and 51 deletions

View File

@@ -136,6 +136,9 @@ cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_s
# 京东全民开红包 # 京东全民开红包
cron "1 1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 cron "1 1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包
# 闪购盲盒
cron "20 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js, tag=闪购盲盒
# 进店领豆 # 进店领豆
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js,tag=进店领豆 cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js,tag=进店领豆

View File

@@ -39,6 +39,7 @@
"12 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js, tag=京东金融养猪猪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyz.png, enabled=true", "12 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js, tag=京东金融养猪猪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyz.png, enabled=true",
"1 7-21/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true", "1 7-21/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true",
"1 1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true", "1 1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true",
"20 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js, tag=闪购盲盒, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_sgmh.png, enabled=true",
"10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true", "10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true",
"16 22 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png, enabled=true", "16 22 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png, enabled=true",
"8 0-23/3 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true", "8 0-23/3 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true",

View File

@@ -51,6 +51,7 @@ crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,scrip
京东金融养猪猪 = type=cron,cronexp="12 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js 京东金融养猪猪 = type=cron,cronexp="12 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js
京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js 京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js
京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js 京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js
闪购盲盒 = type=cron,cronexp="20 8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js
进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js 进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js
东东小窝 = type=cron,cronexp="16 22 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js 东东小窝 = type=cron,cronexp="16 22 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js
天天加速 = type=cron,cronexp="8 0-23/3 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js 天天加速 = type=cron,cronexp="8 0-23/3 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js

View File

@@ -87,6 +87,7 @@ const inviteCodes = [
.finally(() => { .finally(() => {
$.done(); $.done();
}) })
async function jdNian() { async function jdNian() {
try { try {
$.risk = false $.risk = false
@@ -102,6 +103,7 @@ async function jdNian() {
$.logErr(e) $.logErr(e)
} }
} }
function showMsg() { function showMsg() {
return new Promise(resolve => { return new Promise(resolve => {
message += `本次运行获得${$.earn}金币,当前${$.coin}金币` message += `本次运行获得${$.earn}金币,当前${$.coin}金币`
@@ -113,6 +115,7 @@ function showMsg() {
resolve() resolve()
}) })
} }
async function helpFriends() { async function helpFriends() {
for (let code of $.newShareCodes) { for (let code of $.newShareCodes) {
if (!code) continue if (!code) continue
@@ -120,6 +123,7 @@ async function helpFriends() {
await $.wait(2000) await $.wait(2000)
} }
} }
function doTask(itemToken) { function doTask(itemToken) {
return new Promise((resolve) => { return new Promise((resolve) => {
$.post(taskPostUrl('mcxhd_brandcity_doTask', {itemToken: itemToken}, 'mcxhd_brandcity_doTask'), async (err, resp, data) => { $.post(taskPostUrl('mcxhd_brandcity_doTask', {itemToken: itemToken}, 'mcxhd_brandcity_doTask'), async (err, resp, data) => {
@@ -137,8 +141,7 @@ function doTask(itemToken) {
else { else {
console.log(`任务请求结果未知`) console.log(`任务请求结果未知`)
} }
} } else {
else{
console.log(data.retMessage) console.log(data.retMessage)
} }
} }
@@ -150,6 +153,7 @@ function doTask(itemToken) {
}) })
}) })
} }
function doTask2(taskToken) { function doTask2(taskToken) {
let body = { let body = {
"dataSource": "newshortAward", "dataSource": "newshortAward",
@@ -167,8 +171,7 @@ function doTask2(taskToken) {
data = JSON.parse(data); data = JSON.parse(data);
if (data.code === "0") { if (data.code === "0") {
console.log(data.toast.subTitle) console.log(data.toast.subTitle)
} } else {
else{
console.log(`任务完成失败,错误信息:${JSON.stringify(data)}`) console.log(`任务完成失败,错误信息:${JSON.stringify(data)}`)
} }
} }
@@ -181,6 +184,7 @@ function doTask2(taskToken) {
}) })
}) })
} }
function getHomeData(info = false) { function getHomeData(info = false) {
return new Promise((resolve) => { return new Promise((resolve) => {
$.post(taskPostUrl('mcxhd_brandcity_homePage'), async (err, resp, data) => { $.post(taskPostUrl('mcxhd_brandcity_homePage'), async (err, resp, data) => {
@@ -198,8 +202,7 @@ function getHomeData(info=false) {
console.log(`当前用户金币${userCoinNum}`) console.log(`当前用户金币${userCoinNum}`)
} }
$.coin = userCoinNum $.coin = userCoinNum
} } else {
else{
$.risk = true $.risk = true
console.log(`账号被风控,无法参与活动`) console.log(`账号被风控,无法参与活动`)
message += `账号被风控,无法参与活动\n` message += `账号被风控,无法参与活动\n`
@@ -229,7 +232,7 @@ function getTaskList(body={}) {
if (data.retCode === '200') { if (data.retCode === '200') {
$.tasks = data.result.tasks $.tasks = data.result.tasks
for (let vo of $.tasks) { for (let vo of $.tasks) {
if(vo.taskType==="1" || vo.taskType==="2" || vo.taskType==="5" || vo.taskType==="3") { if (vo.taskType === "13" || vo.taskType === "2" || vo.taskType === "5" || vo.taskType === "3") {
// 签到,逛一逛 // 签到,逛一逛
for (let i = vo.times, j = 0; i < vo.maxTimes && j < vo.subItem.length; ++i, ++j) { for (let i = vo.times, j = 0; i < vo.maxTimes && j < vo.subItem.length; ++i, ++j) {
console.log(`去做${vo.taskName}任务,${i + 1}/${vo.maxTimes}`) console.log(`去做${vo.taskName}任务,${i + 1}/${vo.maxTimes}`)
@@ -271,7 +274,10 @@ function getTaskList(body={}) {
function readShareCode() { function readShareCode() {
console.log(`开始`) console.log(`开始`)
return new Promise(async resolve => { return new Promise(async resolve => {
$.get({url: `http://jd.turinglabs.net/api/v2/jd/immortal/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { $.get({
url: `http://jd.turinglabs.net/api/v2/jd/immortal/read/${randomCount}/`,
'timeout': 10000
}, (err, resp, data) => {
try { try {
if (err) { if (err) {
console.log(`${JSON.stringify(err)}`) console.log(`${JSON.stringify(err)}`)
@@ -292,6 +298,7 @@ function readShareCode() {
resolve() resolve()
}) })
} }
//格式化助力码 //格式化助力码
function shareCodesFormat() { function shareCodesFormat() {
return new Promise(async resolve => { return new Promise(async resolve => {
@@ -312,6 +319,7 @@ function shareCodesFormat() {
resolve(); resolve();
}) })
} }
function requireConfig() { function requireConfig() {
return new Promise(async resolve => { return new Promise(async resolve => {
console.log(`开始获取${$.name}配置文件\n`); console.log(`开始获取${$.name}配置文件\n`);
@@ -393,6 +401,7 @@ function taskPostUrl(function_id, body = {}, function_id2) {
} }
} }
} }
function taskPostUrl2(function_id, body = {}, function_id2) { function taskPostUrl2(function_id, body = {}, function_id2) {
let url = `${JD_API_HOST}`; let url = `${JD_API_HOST}`;
if (function_id2) { if (function_id2) {
@@ -410,6 +419,7 @@ function taskPostUrl2(function_id, body = {}, function_id2) {
} }
} }
} }
function TotalBean() { function TotalBean() {
return new Promise(async resolve => { return new Promise(async resolve => {
const options = { const options = {
@@ -450,6 +460,7 @@ function TotalBean() {
}) })
}) })
} }
function safeGet(data) { function safeGet(data) {
try { try {
if (typeof JSON.parse(data) == "object") { if (typeof JSON.parse(data) == "object") {
@@ -461,6 +472,7 @@ function safeGet(data) {
return false; return false;
} }
} }
function jsonParse(str) { function jsonParse(str) {
if (typeof str == "string") { if (typeof str == "string") {
try { try {

View File

@@ -118,10 +118,14 @@ async function jdWish() {
let task = $.taskList[i] let task = $.taskList[i]
if (task['taskId'] === 1 && task['status'] !== 2) { if (task['taskId'] === 1 && task['status'] !== 2) {
console.log(`去做任务:${task.taskName}`) console.log(`去做任务:${task.taskName}`)
await doTask({"taskId": task['taskId']}) await doTask({"taskId": task['taskId'],"mpVersion":"3.4.0"})
} else if (task['taskId'] !== 3 && task['status'] !== 2) { } else if (task['taskId'] !== 3 && task['status'] !== 2) {
console.log(`去做任务:${task.taskName}`) console.log(`去做任务:${task.taskName}`)
await doTask({"taskId": task['taskId']}) if(task['itemId'])
await doTask({"itemId":task['itemId'],"taskId":task['taskId'],"mpVersion":"3.4.0"})
else
await doTask({"taskId": task['taskId'],"mpVersion":"3.4.0"})
await $.wait(3000)
} }
} }
await getTaskList(); await getTaskList();
@@ -330,7 +334,7 @@ function doTask(body, func = "doInteractTask") {
async function helpFriends() { async function helpFriends() {
for (let code of $.newShareCodes) { for (let code of $.newShareCodes) {
if (!code) continue if (!code) continue
await doTask({"itemId": code, "taskId": "3", "mpVersion": "3.1.0"}, "doHelpTask") await doTask({"itemId": code, "taskId": "3", "mpVersion": "3.4.0"}, "doHelpTask")
} }
} }
function readShareCode() { function readShareCode() {

View File

@@ -568,19 +568,27 @@ function helpShareCode(smp, active, joinnum) {
const {ret, retmsg = ''} = JSON.parse(res); const {ret, retmsg = ''} = JSON.parse(res);
$.log(`助力结果ret=${ret} retmsg="${retmsg ? retmsg : 'OK'}"`); $.log(`助力结果ret=${ret} retmsg="${retmsg ? retmsg : 'OK'}"`);
// ret=0 助力成功 // ret=0 助力成功
// ret=1021 cannot help self 不能助力自己
// ret=1011 active 不同 // ret=1011 active 不同
// ret=1012 has complete 已完成
// ret=1013 retmsg="has expired" 已过期
// ret=1009 retmsg="today has help p2p" 今天已助力过 // ret=1009 retmsg="today has help p2p" 今天已助力过
// ret=1021 cannot help self 不能助力自己
// ret=1032 retmsg="err operate env" 被助力者为 APP 专属种子,当前助力账号未配置 TOKEN // ret=1032 retmsg="err operate env" 被助力者为 APP 专属种子,当前助力账号未配置 TOKEN
if (ret === 0 || ret === 1009 || ret === 1011 || ret === 1021 || ret === 1032) { // if (ret === 0 || ret === 1009 || ret === 1011 || ret === 1012 || ret === 1021 || ret === 1032) {
resolve(true); // resolve(true);
return; // return;
} // }
// ret 1016 助力上限 // ret 1016 当前账号达到助力上限
// ret 147 filter 当前账号黑号了 // ret 147 filter 当前账号黑号了
if (ret === 147 || ret === 1016) {
if (ret === 147) { if (ret === 147) {
$.log(`\n\n !!!!!!!! 当前账号黑号了 !!!!!!!! \n\n`); $.log(`\n\n !!!!!!!! 当前账号黑号了 !!!!!!!! \n\n`);
} }
resolve(false);
return;
}
resolve(true);
return;
} catch (e) { } catch (e) {
$.logErr(e, resp); $.logErr(e, resp);
} finally { } finally {

View File

@@ -161,6 +161,7 @@ async function doTask() {
if (task.status === 1) { if (task.status === 1) {
await collectScore(item.taskId, task.itemId); await collectScore(item.taskId, task.itemId);
} }
await $.wait(3000)
} }
} else if (item.status === 2) { } else if (item.status === 2) {
console.log(`${item.taskName}已做完`) console.log(`${item.taskName}已做完`)
@@ -174,6 +175,7 @@ async function doTask() {
if (task.status === 1) { if (task.status === 1) {
await collectScore(item.taskId, task.itemId, 1); await collectScore(item.taskId, task.itemId, 1);
} }
await $.wait(3000)
} }
} else if(item.status===2){ } else if(item.status===2){
console.log(`${item.taskName}已做完`) console.log(`${item.taskName}已做完`)
@@ -190,6 +192,13 @@ async function doTask() {
} else if(item.status===2){ } else if(item.status===2){
console.log(`${item.taskName}已做完`) console.log(`${item.taskName}已做完`)
} }
}else if (item.taskType === 13) {
if (item.status === 1) {
console.log(`准备做此任务:${item.taskName}`)
await collectScore(item.taskId, "1");
} else if(item.status===2){
console.log(`${item.taskName}已做完`)
}
} }
} }
} }
@@ -259,7 +268,7 @@ function getHomeData(info=false) {
$.secretp = null $.secretp = null
return return
} }
console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore}🧨`) console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore-$.userInfo.raiseInfo.curLevelStartScore}🧨`)
if(info) { if(info) {
message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n`
@@ -269,8 +278,8 @@ function getHomeData(info=false) {
console.log(`可收取的爆竹大于0去收取爆竹`) console.log(`可收取的爆竹大于0去收取爆竹`)
await collectProduceScore() await collectProduceScore()
} }
if(parseInt($.userInfo.raiseInfo.remainScore) >= parseInt($.userInfo.raiseInfo.curLevelStartScore)){ if(parseInt($.userInfo.raiseInfo.remainScore) >= parseInt($.userInfo.raiseInfo.nextLevelScore-$.userInfo.raiseInfo.curLevelStartScore)){
console.log(`去升级`) console.log(`当前爆竹🧨大于升级所需爆竹🧨,去升级`)
await $.wait(2000) await $.wait(2000)
await raise() await raise()
} }

394
jd_sgmh.js Normal file

File diff suppressed because one or more lines are too long