(functionId, body = '', stk)
| 1499 | } |
| 1500 | |
| 1501 | function taskurl(functionId, body = '', stk) { |
| 1502 | let url = `${JD_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1` |
| 1503 | url += `&h5st=${decrypt(Date.now(), stk, '', url)}` |
| 1504 | if (stk) { |
| 1505 | url += `&_stk=${encodeURIComponent(stk)}`; |
| 1506 | } |
| 1507 | return { |
| 1508 | url, |
| 1509 | headers: { |
| 1510 | 'Cookie': cookie, |
| 1511 | 'Host': 'm.jingxi.com', |
| 1512 | 'Accept': '*/*', |
| 1513 | 'Connection': 'keep-alive', |
| 1514 | 'User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou', |
| 1515 | 'Accept-Language': 'zh-cn', |
| 1516 | 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', |
| 1517 | 'Accept-Encoding': 'gzip, deflate, br', |
| 1518 | } |
| 1519 | } |
| 1520 | } |
| 1521 | function newtasksysUrl(functionId, taskId, stk) { |
| 1522 | let url = `${JD_API_HOST}/newtasksys/newtasksys_front/${functionId}?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1`; |
| 1523 | if (taskId) { |
no test coverage detected