(type)
| 293 | } |
| 294 | |
| 295 | async function getPostBody(type) { |
| 296 | return new Promise(async resolve => { |
| 297 | let taskBody = ''; |
| 298 | try { |
| 299 | const log = await getBody() |
| 300 | if (type === 'help' || type === 'shHelp') { |
| 301 | taskBody = `functionId=olympicgames_assist&body=${JSON.stringify({"inviteId":$.inviteId,"type": "confirm","ss" :log})}&client=wh5&clientVersion=1.0.0&appid=${$.appid}` |
| 302 | } |
| 303 | } catch (e) { |
| 304 | $.logErr(e) |
| 305 | } finally { |
| 306 | resolve(taskBody); |
| 307 | } |
| 308 | }) |
| 309 | } |
| 310 | |
| 311 | async function getPostRequest(type, body) { |
| 312 | let url = `https://api.m.jd.com/client.action?advId=${type}`; |
no test coverage detected