优化,减少网络请求
This commit is contained in:
@@ -65,6 +65,7 @@ let helpCode = []
|
||||
return;
|
||||
}
|
||||
$.temp = [];
|
||||
await updateShareCodesCDN();
|
||||
for (let i = 0; i < cookiesArr.length; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i];
|
||||
@@ -589,7 +590,6 @@ async function doHelp() {
|
||||
}
|
||||
// await updateShareCodes();
|
||||
// if (!$.updatePkActivityIdRes) await updateShareCodesCDN();
|
||||
await updateShareCodesCDN();
|
||||
if ($.updatePkActivityIdRes && $.updatePkActivityIdRes['shareCodes']) tempCode = $.updatePkActivityIdRes['shareCodes'];
|
||||
console.log(`是否大于当天九点🕘:${nowTime > new Date(nowTime).setHours(9, 0, 0, 0)}`)
|
||||
//当天大于9:00才从API里面取收集的助力码
|
||||
|
@@ -88,6 +88,7 @@ const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api';
|
||||
await smallHome();
|
||||
}
|
||||
}
|
||||
await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateSmallHomeInviteCode.json');
|
||||
for (let i = 0; i < cookiesArr.length; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i];
|
||||
@@ -150,7 +151,6 @@ async function doChannelsListTask(taskId, taskType) {
|
||||
async function helpFriends() {
|
||||
// await updateInviteCode();
|
||||
// if (!$.inviteCodes) await updateInviteCodeCDN();
|
||||
await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateSmallHomeInviteCode.json');
|
||||
if ($.inviteCodes && $.inviteCodes['inviteCode']) {
|
||||
for (let item of $.inviteCodes.inviteCode) {
|
||||
if (!item) continue
|
||||
|
Reference in New Issue
Block a user