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

Function getTaskList

jd_joypark_open.js:109–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108//任务列表
109function getTaskList() {
110 return new Promise(resolve => {
111 $.post(taskPostClientActionUrl(`body=%7B%22linkId%22%3A%22LsQNxL7iWDlXUs6cFl-AAg%22%7D&appid=activities_platform`,`apTaskList`), async (err, resp, data) => {
112 $.log('=== 任务列表 start ===')
113 try {
114 if (err) {
115 console.log(`${JSON.stringify(err)}`)
116 console.log(`${$.name} API请求失败,请检查网路重试`)
117 } else {
118 data = JSON.parse(data);
119 $.taskList = data.data
120 $.taskList.forEach( row =>{
121 $.log(`${row.taskTitle} ${row.taskDoTimes}/${row.taskLimitTimes}`)
122 })
123 $.log('=== 任务列表 end ===')
124 }
125 } catch (e) {
126 $.logErr(e, resp)
127 } finally {
128 resolve(data);
129 }
130 })
131 })
132}
133
134/**
135 * 互助

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected