| 304 | return fmt; |
| 305 | } |
| 306 | async function help(){ |
| 307 | const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22itemToken%22:%22${$.helpCode}%22,%22token%22:%22${$.tokenId}%22%7D&appid=xdz&functionId=mcxhd_starmall_doTask&t=${Date.now()}&loginWQBiz=`; |
| 308 | const method = `GET`; |
| 309 | const headers = { |
| 310 | 'Origin': `https://h5.m.jd.com`, |
| 311 | 'Cookie': $.cookie, |
| 312 | 'Accept-Encoding': `gzip, deflate, br`, |
| 313 | 'Accept-Language': `zh-cn`, |
| 314 | 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), |
| 315 | 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, |
| 316 | 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, |
| 317 | 'Accept': `application/json, text/plain, */*`, |
| 318 | 'Host': `api.m.jd.com`, |
| 319 | }; |
| 320 | const myRequest = {url: url, method: method, headers: headers,}; |
| 321 | return new Promise(async resolve => { |
| 322 | $.get(myRequest, (err, resp, data) => { |
| 323 | try { |
| 324 | console.log(`助力结果`); |
| 325 | console.log(data); |
| 326 | } catch (e) { |
| 327 | $.logErr(e, resp) |
| 328 | } finally { |
| 329 | resolve(); |
| 330 | } |
| 331 | }) |
| 332 | }) |
| 333 | } |
| 334 | |
| 335 | |
| 336 | async function drawAward(){ |