KingRan 2022-03-01 17:43:07 +08:00
parent e4cb2f6a08
commit 3d59a2fd5a
1 changed files with 23 additions and 1 deletions

View File

@ -785,7 +785,29 @@ function getshopactivityId() {
})
})
}
function getAuthorCodeList(url) {
return new Promise(resolve => {
const options = {
url: `${url}?${new Date()}`, "timeout": 10000, headers: {
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
}
};
$.get(options, async (err, resp, data) => {
try {
if (err) {
$.log(err)
} else {
if (data) data = JSON.parse(data)
}
} catch (e) {
$.logErr(e, resp)
data = null;
} finally {
resolve(data);
}
})
})
}
function jsonParse(str) {
if (typeof str == "string") {
try {