update
This commit is contained in:
@ -50,7 +50,7 @@
|
||||
# 京东排行榜
|
||||
11 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1
|
||||
# 天天提鹅
|
||||
18 */3 * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1
|
||||
18 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1
|
||||
# 金融养猪
|
||||
12 13 * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1
|
||||
# 点点券
|
||||
@ -58,4 +58,4 @@
|
||||
# 京喜工厂
|
||||
20 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1
|
||||
# 东东小窝
|
||||
16 0 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1
|
||||
16 6 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1
|
@ -50,7 +50,7 @@
|
||||
# 京东排行榜
|
||||
11 9 * * * node /scripts/jd_rankingList.js |ts >> /scripts/logs/jd_rankingList.log 2>&1
|
||||
# 天天提鹅
|
||||
18 */3 * * * node /scripts/jd_daily_egg.js |ts >> /scripts/logs/jd_daily_egg.log 2>&1
|
||||
18 * * * * node /scripts/jd_daily_egg.js |ts >> /scripts/logs/jd_daily_egg.log 2>&1
|
||||
# 金融养猪
|
||||
12 * * * * node /scripts/jd_pigPet.js |ts >> /scripts/logs/jd_pigPet.log 2>&1
|
||||
# 点点券
|
||||
@ -58,4 +58,4 @@
|
||||
# 京喜工厂
|
||||
20 * * * * node /scripts/jd_dreamFactory.js |ts >> /scripts/logs/jd_dreamFactory.log 2>&1
|
||||
# 东东小窝
|
||||
16 0 * * * node /scripts/jd_small_home.js |ts >> /scripts/logs/jd_small_home.log 2>&1
|
||||
16 6 * * * node /scripts/jd_small_home.js |ts >> /scripts/logs/jd_small_home.log 2>&1
|
@ -57,7 +57,7 @@ if ($.isNode()) {
|
||||
}
|
||||
|
||||
const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api';
|
||||
const inviteCodes = ['1330186694770339842', '1330185661529935874'];
|
||||
|
||||
!(async () => {
|
||||
if (!cookiesArr[0]) {
|
||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
||||
@ -156,7 +156,9 @@ async function doChannelsListTask(taskId, taskType) {
|
||||
}
|
||||
}
|
||||
async function helpFriends() {
|
||||
for (let item of inviteCodes) {
|
||||
await updateInviteCode();
|
||||
if (!$.updatePkActivityIdRes) await updateInviteCodeCDN();
|
||||
for (let item of $.inviteCodes.inviteCode) {
|
||||
if (!item) continue
|
||||
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
||||
}
|
||||
@ -165,7 +167,7 @@ async function doAllTask() {
|
||||
await queryAllTaskInfo();//获取任务详情列表$.taskList
|
||||
console.log(` 任务名称 完成进度 `)
|
||||
for (let item of $.taskList) {
|
||||
console.log(`${item.ssjjTaskInfo.name} ${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum || 1}`)
|
||||
console.log(`${item.ssjjTaskInfo.name} ${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum || (item.ssjjTaskInfo.type === 1 ? 4: 1)}`)
|
||||
}
|
||||
for (let item of $.taskList) {
|
||||
if (item.ssjjTaskInfo.type === 1) {
|
||||
@ -413,7 +415,7 @@ function createInviteUser() {
|
||||
if (data.head.code === 200) {
|
||||
if (data.body) {
|
||||
if (data.body.id) {
|
||||
console.log(`\n您的${$.name}shareCode:【${data.body.id}】\n`);
|
||||
console.log(`\n您的${$.name}shareCode(每天都是变化的):【${data.body.id}】\n`);
|
||||
$.shareCode = data.body.id;
|
||||
}
|
||||
}
|
||||
@ -691,6 +693,41 @@ function login(userName) {
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
$.inviteCodes = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateInviteCodeCDN(url = 'https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateSmallHomeInviteCode.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
$.inviteCodes = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function taskUrl(url, body = {}) {
|
||||
return {
|
||||
url: `${JD_API_HOST}/${url}?body=${escape(body)}`,
|
||||
|
Reference in New Issue
Block a user