| 309 | } |
| 310 | |
| 311 | async function getPostRequest(type, body) { |
| 312 | let url = `https://api.m.jd.com/client.action?advId=${type}`; |
| 313 | const method = `POST`; |
| 314 | const headers = { |
| 315 | "Accept": "application/json", |
| 316 | "Accept-Encoding": "gzip, deflate, br", |
| 317 | "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", |
| 318 | "Connection": "keep-alive", |
| 319 | "Content-Type": "application/x-www-form-urlencoded", |
| 320 | 'Cookie': $.cookie, |
| 321 | "Origin": "https://wbbny.m.jd.com", |
| 322 | "Referer": "https://wbbny.m.jd.com/", |
| 323 | "User-Agent": "jdapp;iPhone;9.2.0;14.1;", |
| 324 | |
| 325 | }; |
| 326 | return {url: url, method: method, headers: headers, body: body}; |
| 327 | } |
| 328 | |
| 329 | |
| 330 | |