This commit is contained in:
lxk0301
2021-01-30 21:20:51 +08:00
parent 684a6e902b
commit 094680c50c
3 changed files with 10 additions and 10 deletions

View File

@@ -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) {