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

Function apTaskDrawAward

jd_joypark_task.js:305–324  ·  view source on GitHub ↗
(taskId,taskType)

Source from the content-addressed store, hash-verified

303}
304
305function apTaskDrawAward(taskId,taskType) {
306 //await $.wait(20)
307 return new Promise(resolve => {
308 $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`,`apTaskDrawAward`), async (err, resp, data) => {
309 try {
310 if (err) {
311 console.log(`${JSON.stringify(err)}`)
312 console.log(`${$.name} API请求失败,请检查网路重试`)
313 } else {
314 data = JSON.parse(data);
315 $.log("领取奖励")
316 }
317 } catch (e) {
318 $.logErr(e, resp)
319 } finally {
320 resolve(data);
321 }
322 })
323 })
324}
325
326
327function taskPostClientActionUrl(body,functionId) {

Callers 1

jd_joypark_task.jsFile · 0.70

Calls 4

taskPostClientActionUrlFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected