(function_id, body)
| 807 | } |
| 808 | |
| 809 | function taskurl(function_id, body) { |
| 810 | return { |
| 811 | url: JD_API_HOST + '/' + function_id + '?_=' + new Date().getTime() * 1000, |
| 812 | body: `reqData=${function_id === 'harvest' || function_id === 'login' || function_id === 'signIndex' || function_id === 'signOne' || function_id === 'setUserLinkStatus' || function_id === 'dayWork' || function_id === 'getSignAward' || function_id === 'sell' || function_id === 'friendRank' || function_id === 'friendTree' || function_id === 'stealFruit' ? encodeURIComponent(JSON.stringify(body)) : JSON.stringify(body)}`, |
| 813 | headers: { |
| 814 | 'Accept': `application/json`, |
| 815 | 'Origin': `https://uua.jr.jd.com`, |
| 816 | 'Accept-Encoding': `gzip, deflate, br`, |
| 817 | 'Cookie': cookie, |
| 818 | 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, |
| 819 | 'Host': `ms.jr.jd.com`, |
| 820 | 'Connection': `keep-alive`, |
| 821 | '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"), |
| 822 | 'Referer': `https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index`, |
| 823 | 'Accept-Language': `zh-cn` |
| 824 | } |
| 825 | } |
| 826 | } |
| 827 | |
| 828 | function TotalBean() { |
| 829 | return new Promise(async resolve => { |
no test coverage detected