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

Function getTaskList

jd_joypark_task.js:199–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197
198//任务列表
199function getTaskList() {
200 //await $.wait(20)
201 return new Promise(resolve => {
202 $.post(taskPostClientActionUrl(`body=%7B%22linkId%22%3A%22LsQNxL7iWDlXUs6cFl-AAg%22%7D&appid=activities_platform`, `apTaskList`), async (err, resp, data) => {
203 $.log('=== 任务列表 start ===')
204 try {
205 if (err) {
206 console.log(`${JSON.stringify(err)}`)
207 console.log(`${$.name} API请求失败,请检查网路重试`)
208 } else {
209 data = JSON.parse(data);
210 $.taskList = data.data
211 for (const row of $.taskList) {
212 $.log(`${row.taskTitle} ${row.taskDoTimes}/${row.taskLimitTimes}`)
213 }
214 $.log('=== 任务列表 end ===')
215 }
216 } catch (e) {
217 $.logErr(e, resp)
218 } finally {
219 resolve(data);
220 }
221 })
222 })
223}
224
225/**
226 * 互助

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