This commit is contained in:
any
2021-01-29 23:40:35 +08:00
8 changed files with 37 additions and 35 deletions

View File

@@ -161,7 +161,7 @@ cron "8 0-23/3 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/maste
cron "20 7 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js,tag=京东超级盒子 cron "20 7 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js,tag=京东超级盒子
# 东东超市 # 东东超市
cron "11 1-23/5 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js,tag=东东超市 cron "11 * * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js,tag=东东超市
# 赚京豆 # 赚京豆
cron "10 7 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js, tag=赚京豆 cron "10 7 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js, tag=赚京豆

View File

@@ -48,7 +48,7 @@
"16 22 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png, enabled=true", "16 22 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png, enabled=true",
"8 0-23/3 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true", "8 0-23/3 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true",
"20 7 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js, tag=京东超级盒子, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true", "20 7 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js, tag=京东超级盒子, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true",
"11 1-23/5 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js, tag=东东超市, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true", "11 * * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js, tag=东东超市, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true",
"10 7 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js, tag=赚京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true", "10 7 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js, tag=赚京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true",
"55 23 * * 6 https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js, tag=注销京东会员卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png, enabled=true", "55 23 * * 6 https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js, tag=注销京东会员卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png, enabled=true",
"55 23 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js, tag=取关京东店铺商品, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true", "55 23 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js, tag=取关京东店铺商品, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true",

View File

@@ -59,7 +59,7 @@ crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,scrip
东东小窝 = type=cron,cronexp="16 22 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js 东东小窝 = type=cron,cronexp="16 22 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js
天天加速 = type=cron,cronexp="8 0-23/3 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js 天天加速 = type=cron,cronexp="8 0-23/3 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js
京东超级盒子 = type=cron,cronexp="20 7 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js 京东超级盒子 = type=cron,cronexp="20 7 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js
东东超市 = type=cron,cronexp="11 1-23/5 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js 东东超市 = type=cron,cronexp="11 * * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js
赚京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js 赚京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js
注销京东会员卡 = type=cron,cronexp="55 23 * * 6",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js 注销京东会员卡 = type=cron,cronexp="55 23 * * 6",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js
取关京东店铺商品 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js 取关京东店铺商品 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js

View File

@@ -178,10 +178,8 @@ function getQuestions() {
hasFound = true hasFound = true
} else { } else {
console.log(`在脚本内置题库中 未找到答案,去线上题库寻找~`); console.log(`在脚本内置题库中 未找到答案,去线上题库寻找~`);
await requireTk(); ques = await getQues(vo.questionId)
ques = $.tk.filter(qo => qo.questionId === vo.questionId); if (ques) {
if (ques.length) {
ques = ques[0]
let ans = JSON.parse(ques.correct) let ans = JSON.parse(ques.correct)
let opt = vo.options.filter(bo => bo.optionDesc === ans.optionDesc) let opt = vo.options.filter(bo => bo.optionDesc === ans.optionDesc)
if (opt.length) { if (opt.length) {
@@ -282,6 +280,30 @@ function submitQues(question) {
}) })
} }
function getQues(questionId) {
return new Promise(resolve => {
$.get({
'url': `http://qa.turinglabs.net:8081/api/v1/question/${questionId}/`,
'headers': {
'Content-Type': 'application/json'
}
}, (err, resp, data) => {
try {
data = JSON.parse(data)
if (data.status === 200) {
resolve(data.data)
} else {
resolve(null)
}
} catch (e) {
console.log(e)
} finally {
resolve()
}
})
})
}
function answer(body = {}) { function answer(body = {}) {
return new Promise((resolve) => { return new Promise((resolve) => {
$.get(taskUrl('mcxhd_brandcity_answerQuestion', {"costTime": 1, ...body}), async (err, resp, data) => { $.get(taskUrl('mcxhd_brandcity_answerQuestion', {"costTime": 1, ...body}), async (err, resp, data) => {
@@ -427,24 +449,6 @@ function TotalBean() {
}) })
} }
function requireTk() {
return new Promise(resolve => {
$.get({
url: `http://qn6l5d6wm.hn-bkt.clouddn.com/question.json?t=${new Date().getTime()}`,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4371.0 Safari/537.36'
}
}, (err, resp, data) => {
try {
$.tk = JSON.parse(data).RECORDS;
} catch (e) {
console.log(e)
} finally {
resolve()
}
})
})
}
function safeGet(data) { function safeGet(data) {
try { try {

View File

@@ -134,7 +134,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`

View File

@@ -136,7 +136,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}🧨`)
} }
else{ else{
$.secretp = null $.secretp = null

View File

@@ -40,12 +40,12 @@ inputs:
cronExpression: "0 3 */1 * * * *" cronExpression: "0 3 */1 * * * *"
enable: true enable: true
argument: jd_joy_feedPets&jd_joy&jd_moneyTree&jd_plantBean&jd_dreamFactory&jd_jdfactory&jd_nianCollect argument: jd_joy_feedPets&jd_joy&jd_moneyTree&jd_plantBean&jd_dreamFactory&jd_jdfactory&jd_nianCollect
- timer: #宠汪汪积分兑换奖品 #宠汪汪偷好友积分与狗 #点点券 #东东小窝 #京东直播18豆 #集鞭炮赢京豆 - timer: #宠汪汪积分兑换奖品 #宠汪汪偷好友积分与狗 #点点券 #东东小窝 #京东直播18豆
parameters: parameters:
name: joyreward_joysteal_necklace_smallhome_live_firecrackers name: joyreward_joysteal_necklace_smallhome_live
cronExpression: "0 0 0-16/8,20 * * * *" cronExpression: "0 0 0-16/8,20 * * * *"
enable: true enable: true
argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_small_home&jd_live&jd_firecrackers argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_small_home&jd_live
- timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #京东汽车 #京东秒秒币 #小鸽有礼 - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #注销京东会员卡 #京东抽奖机 #京东汽车 #京东秒秒币 #小鸽有礼
parameters: parameters:
name: redPacket_shop_unsubscribe_unbind_lotteryMachine_car_ms_xg name: redPacket_shop_unsubscribe_unbind_lotteryMachine_car_ms_xg

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
## Author: https://github.com/EvineDeng ## Author: https://github.com/EvineDeng
## Modified 2021-01-24 ## Modified 2021-01-29
## Version v1.0.0 ## Version v1.0.1
## 网址、路径、文件、标记信息以及表头 ## 网址、路径、文件、标记信息以及表头
WorkDir=$(cd $(dirname $0); pwd) WorkDir=$(cd $(dirname $0); pwd)
@@ -23,9 +23,7 @@ Sheet=$SheetHead
for ((i=0; i<${#JsList[*]}; i++)); do for ((i=0; i<${#JsList[*]}; i++)); do
Name=$(grep "new Env" ${JsList[i]} | awk -F "'|\"" '{print $2}') Name=$(grep "new Env" ${JsList[i]} | awk -F "'|\"" '{print $2}')
Entry=$(grep -E "活动入口" ${JsList[i]} | awk -F "|: " '{print $2}') Entry=$(grep -E "活动入口" ${JsList[i]} | awk -F "|: " '{print $2}')
if [[ $(echo $Entry | grep "http") != "" ]]; then [[ $Entry == http* ]] && Entry="[活动地址]($Entry)"
Entry="[活动地址]($Entry)"
fi
Raw="$UrlRaw${JsList[i]}" Raw="$UrlRaw${JsList[i]}"
Sheet="$Sheet\n|$(($i + 1))|[${JsList[i]}]($Raw)|$Name|$Entry|" Sheet="$Sheet\n|$(($i + 1))|[${JsList[i]}]($Raw)|$Name|$Entry|"
done done