MCPcopy Create free account
hub / github.com/Semporia/Scripts / taskUrl

Function taskUrl

jd_nzmh.js:208–223  ·  view source on GitHub ↗
(function_id, body = '')

Source from the content-addressed store, hash-verified

206}
207
208function taskUrl(function_id, body = '') {
209 body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}`
210 return {
211 url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`,
212 headers: {
213 'Host': 'wq.jd.com',
214 'Accept': 'application/json',
215 'Accept-Language': 'zh-cn',
216 'Content-Type': 'application/json;charset=utf-8',
217 'Origin': 'wq.jd.com',
218 "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"),
219 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`,
220 'Cookie': cookie
221 }
222 }
223}
224
225function TotalBean() {
226 return new Promise(async resolve => {

Callers 3

getUserInfoFunction · 0.70
doTaskFunction · 0.70
drawFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected