MCPcopy Create free account
hub / github.com/Semporia/Scripts / updatePkActivityIdCDN

Function updatePkActivityIdCDN

jd_superMarket.js:1062–1084  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

1060}
1061
1062function updatePkActivityIdCDN(url) {
1063 return new Promise(async resolve => {
1064 const headers = {
1065 "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"
1066 }
1067 $.get({url, headers, timeout: 10000,}, async (err, resp, data) => {
1068 try {
1069 if (err) {
1070 console.log(`${JSON.stringify(err)}`)
1071 console.log(`${$.name} API请求失败,请检查网路重试`)
1072 } else {
1073 $.updatePkActivityIdRes = []
1074 }
1075 } catch (e) {
1076 $.logErr(e, resp)
1077 } finally {
1078 resolve();
1079 }
1080 })
1081 await $.wait(10000)
1082 resolve();
1083 })
1084}
1085
1086function smtgDoShopTask(taskId, itemId) {
1087 return new Promise((resolve) => {

Callers 1

businessCircleActivityFunction · 0.85

Calls 4

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected