(function_id, body, type = 'mission')
| 407 | } |
| 408 | } |
| 409 | function taskUrl(function_id, body, type = 'mission') { |
| 410 | return { |
| 411 | url: `https://ms.jr.jd.com/gw/generic/${type}/h5/m/${function_id}?reqData=${encodeURIComponent(body)}`, |
| 412 | headers: { |
| 413 | 'Accept' : `*/*`, |
| 414 | 'Origin' : `https://u.jr.jd.com`, |
| 415 | 'Accept-Encoding' : `gzip, deflate, br`, |
| 416 | 'Cookie' : cookie, |
| 417 | 'Content-Type' : `application/x-www-form-urlencoded;charset=UTF-8`, |
| 418 | 'Host' : `ms.jr.jd.com`, |
| 419 | 'Connection' : `keep-alive`, |
| 420 | "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"), |
| 421 | 'Referer' : `https://u.jr.jd.com/`, |
| 422 | 'Accept-Language' : `zh-cn` |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | function getFp() { |
| 427 | // const crypto = require('crypto'); |
| 428 | // let fp = crypto.createHash("md5").update($.UserName + '573.9', "utf8").digest("hex").substr(4, 16) |
no test coverage detected