Merge pull request #353 from shylocks/master

Master
This commit is contained in:
lxk0301
2020-12-16 09:39:38 +08:00
committed by GitHub
4 changed files with 789 additions and 1 deletions

View File

@@ -82,6 +82,7 @@ const JD_API_HOST = 'https://car-member.jd.com/api/';
})
async function jdCar() {
await check()
await sign()
await $.wait(1000)
await mission()
@@ -96,6 +97,29 @@ function showMsg() {
})
}
function check() {
return new Promise(resolve => {
$.get(taskUrl('v1/user/exchange/bean/check'), (err, resp, data) => {
try {
if (err) {
data = JSON.parse(resp.body)
console.log(`${data.error.msg}`)
message += `签到失败,${data.error.msg}\n`
} else {
if (safeGet(data)) {
data = JSON.parse(data);
console.log(`兑换结果:${JSON.stringify(data)}`)
}
}
} catch (e) {
$.logErr(e, resp)
} finally {
resolve();
}
})
})
}
function sign() {
return new Promise(resolve => {
$.post(taskUrl('v1/user/sign'), (err, resp, data) => {

View File

@@ -106,7 +106,7 @@ async function jdJdh() {
await queryTask(18,"2951198") // 看名医直播
await queryTask(17,"246147") //
await queryTask(24, t) // 辟谣
// await queryTask(22,"20201215") // TODO打卡尚未完成
await doTask(22,42,`${new Date().getUTCFullYear()}-${new Date().getUTCMonth()+1}-${new Date().getUTCDate()}`) // 去打卡
await queryTask(20,"362451650500001") // 测一测
await doTask(23,40,`${rand(10000, 20000)}`) // 走路,这个可以直接提示领奖结果
// 以下两个需要开启家庭医生才能完成

479
jd_jdzz.js Normal file

File diff suppressed because one or more lines are too long

285
jd_watch.js Normal file

File diff suppressed because one or more lines are too long