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

Function callbackResult

jd_summer_movement.js:523–553  ·  view source on GitHub ↗
(info)

Source from the content-addressed store, hash-verified

521}
522//领取奖励
523function callbackResult(info) {
524 return new Promise((resolve) => {
525 let url = {
526 url: `https://api.m.jd.com/?functionId=qryViewkitCallbackResult&client=wh5&clientVersion=1.0.0&body=${info}&_timestamp=` + Date.now(),
527 headers: {
528 'Origin': `https://bunearth.m.jd.com`,
529 'Cookie': $.cookie,
530 'Connection': `keep-alive`,
531 'Accept': `*/*`,
532 'Host': `api.m.jd.com`,
533 'User-Agent': UA,
534 //$.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"),
535 'Accept-Encoding': `gzip, deflate, br`,
536 'Accept-Language': `zh-cn`,
537 'Content-Type': 'application/x-www-form-urlencoded',
538 'Referer': 'https://bunearth.m.jd.com'
539 }
540 }
541
542 $.get(url, async (err, resp, data) => {
543 try {
544 data = JSON.parse(data);
545 console.log(data.toast.subTitle)
546 } catch (e) {
547 $.logErr(e, resp);
548 } finally {
549 resolve()
550 }
551 })
552 })
553}
554
555async function getPostRequest(body) {
556 const method = `POST`;

Callers 1

doTaskFunction · 0.70

Calls 3

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected