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

Function apDoTask

jd_joypark_open.js:163–181  ·  view source on GitHub ↗
(taskId,taskType,itemId)

Source from the content-addressed store, hash-verified

161
162
163async function apDoTask(taskId,taskType,itemId) {
164 await $.wait(1000)
165 return new Promise(resolve => {
166 $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"channel":4,"linkId":"LsQNxL7iWDlXUs6cFl-AAg","itemId":"${itemId}"}&appid=activities_platform`,`apDoTask`), async (err, resp, data) => {
167 try {
168 if (err) {
169 console.log(`${JSON.stringify(err)}`)
170 console.log(`${$.name} API请求失败,请检查网路重试`)
171 } else {
172 data = JSON.parse(data);
173 }
174 } catch (e) {
175 $.logErr(e, resp)
176 } finally {
177 resolve(data);
178 }
179 })
180 })
181}
182
183async function apTaskDetail(taskId,taskType) {
184 await $.wait(1000)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected