| 242 | }) |
| 243 | } |
| 244 | function taskPostUrl(function_id, body = {}, url=null) { |
| 245 | if(!url) url = `${JD_API_HOST}?functionId=${function_id}` |
| 246 | return { |
| 247 | url: url, |
| 248 | body: body, |
| 249 | headers: { |
| 250 | "Cookie": cookie, |
| 251 | "origin": "https://h5.m.jd.com", |
| 252 | "referer": "https://h5.m.jd.com/", |
| 253 | 'Content-Type': 'application/x-www-form-urlencoded', |
| 254 | "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"), |
| 255 | } |
| 256 | } |
| 257 | } |
| 258 | function taskUrl(function_id, body = {}) { |
| 259 | return { |
| 260 | url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${escape(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, |