(taskId,taskType)
| 303 | } |
| 304 | |
| 305 | function apTaskDrawAward(taskId,taskType) { |
| 306 | //await $.wait(20) |
| 307 | return new Promise(resolve => { |
| 308 | $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`,`apTaskDrawAward`), async (err, resp, data) => { |
| 309 | try { |
| 310 | if (err) { |
| 311 | console.log(`${JSON.stringify(err)}`) |
| 312 | console.log(`${$.name} API请求失败,请检查网路重试`) |
| 313 | } else { |
| 314 | data = JSON.parse(data); |
| 315 | $.log("领取奖励") |
| 316 | } |
| 317 | } catch (e) { |
| 318 | $.logErr(e, resp) |
| 319 | } finally { |
| 320 | resolve(data); |
| 321 | } |
| 322 | }) |
| 323 | }) |
| 324 | } |
| 325 | |
| 326 | |
| 327 | function taskPostClientActionUrl(body,functionId) { |
no test coverage detected