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

Function apTaskDetail

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

Source from the content-addressed store, hash-verified

274}
275
276function apTaskDetail(taskId,taskType) {
277 //await $.wait(20)
278 return new Promise(resolve => {
279 $.post(taskPostClientActionUrl(`functionId=apTaskDetail&body={"taskType":"${taskType}","taskId":${taskId},"channel":4,"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`,`apTaskDetail`), async (err, resp, data) => {
280 try {
281 if (err) {
282 console.log(`${JSON.stringify(err)}`)
283 console.log(`${$.name} API请求失败,请检查网路重试`)
284 } else {
285 data = JSON.parse(data);
286 if (!data.success) {
287 $.taskDetailList = []
288 } else {
289 $.taskDetailList = data.data.taskItemList;
290 }
291 }
292 } catch (e) {
293 $.logErr(e, resp)
294 } finally {
295 if (!data.success) {
296 resolve([]);
297 } else {
298 resolve(data.data.taskItemList);
299 }
300 }
301 })
302 })
303}
304
305function apTaskDrawAward(taskId,taskType) {
306 //await $.wait(20)

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