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

Function apTaskDrawAward

jd_joypark_open.js:204–223  ·  view source on GitHub ↗
(taskId,taskType)

Source from the content-addressed store, hash-verified

202}
203
204async function apTaskDrawAward(taskId,taskType) {
205 await $.wait(1000)
206 return new Promise(resolve => {
207 $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`,`apTaskDrawAward`), async (err, resp, data) => {
208 try {
209 if (err) {
210 console.log(`${JSON.stringify(err)}`)
211 console.log(`${$.name} API请求失败,请检查网路重试`)
212 } else {
213 data = JSON.parse(data);
214 $.log("领取奖励")
215 }
216 } catch (e) {
217 $.logErr(e, resp)
218 } finally {
219 resolve(data);
220 }
221 })
222 })
223}
224
225
226function generateShareUrl(inviterId) {

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