diff --git a/jd_818.js b/jd_818.js index c8fb4c4a..a6b7e074 100644 --- a/jd_818.js +++ b/jd_818.js @@ -589,7 +589,8 @@ async function doHelp() { } // await updateShareCodes(); // if (!$.updatePkActivityIdRes) await updateShareCodesCDN(); - // tempCode = $.updatePkActivityIdRes.shareCodes; + await updateShareCodesCDN(); + if ($.updatePkActivityIdRes && $.updatePkActivityIdRes['shareCodes']) tempCode = $.updatePkActivityIdRes['shareCodes']; console.log(`是否大于当天九点🕘:${nowTime > new Date(nowTime).setHours(9, 0, 0, 0)}`) //当天大于9:00才从API里面取收集的助力码 //if (nowTime > new Date(nowTime).setHours(9, 0, 0, 0)) body = await printAPI();//访问收集的互助码 @@ -857,10 +858,9 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/LXK9301/updat }) }) } -function updateShareCodesCDN(url = 'https://raw.fastgit.org/LXK9301/updateTeam/master/jd_shareCodes.json') { +function updateShareCodesCDN(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/jd_shareCodes.json') { return new Promise(resolve => { //https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_shareCodes.json - //https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_shareCodes.json $.get({url}, async (err, resp, data) => { try { if (err) { diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js index bf596c53..c1ee054b 100644 --- a/jd_dreamFactory.js +++ b/jd_dreamFactory.js @@ -1374,8 +1374,6 @@ function shareCodesFormat() { function requireConfig() { return new Promise(async resolve => { await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json'); - if (!$.tuanIdS) await updateTuanIds(); - if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_updateFactoryTuanId.json'); if ($.tuanIdS && $.tuanIdS.tuanActiveId) { tuanActiveId = $.tuanIdS.tuanActiveId; } diff --git a/jd_small_home.js b/jd_small_home.js index 9709ca81..d847cda3 100644 --- a/jd_small_home.js +++ b/jd_small_home.js @@ -149,11 +149,13 @@ async function doChannelsListTask(taskId, taskType) { } async function helpFriends() { await updateInviteCode(); - if (!$.inviteCodes) await updateInviteCodeCDN(); - if (!$.inviteCodes) await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateSmallHomeInviteCode.json'); - for (let item of $.inviteCodes.inviteCode) { - if (!item) continue - await createAssistUser(item, $.createAssistUserID); + // if (!$.inviteCodes) await updateInviteCodeCDN(); + await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateSmallHomeInviteCode.json'); + if ($.inviteCodes && $.inviteCodes['inviteCode']) { + for (let item of $.inviteCodes.inviteCode) { + if (!item) continue + await createAssistUser(item, $.createAssistUserID); + } } } async function doAllTask() {