| 251 | } |
| 252 | |
| 253 | function taskUrl(function_id, body = {}) { |
| 254 | return { |
| 255 | url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, |
| 256 | headers: { |
| 257 | "Accept": "*/*", |
| 258 | "Accept-Encoding": "gzip, deflate, br", |
| 259 | "Accept-Language": "zh-cn", |
| 260 | "Connection": "keep-alive", |
| 261 | "Content-Type": "application/x-www-form-urlencoded", |
| 262 | "Host": "car-member.jd.com", |
| 263 | "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html", |
| 264 | "Cookie": cookie, |
| 265 | "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"), |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | function taskPostUrl(function_id, body = {}) { |
| 271 | return { |