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

Function callbackResult

jd_zoo.js:787–816  ·  view source on GitHub ↗
(info)

Source from the content-addressed store, hash-verified

785
786//领取奖励
787function callbackResult(info) {
788 return new Promise((resolve) => {
789 let url = {
790 url: `https://api.m.jd.com/?functionId=qryViewkitCallbackResult&client=wh5&clientVersion=1.0.0&body=${info}&_timestamp=` + Date.now(),
791 headers: {
792 'Origin': `https://bunearth.m.jd.com`,
793 'Cookie': $.cookie,
794 'Connection': `keep-alive`,
795 'Accept': `*/*`,
796 'Host': `api.m.jd.com`,
797 '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"),
798 'Accept-Encoding': `gzip, deflate, br`,
799 'Accept-Language': `zh-cn`,
800 'Content-Type': 'application/x-www-form-urlencoded',
801 'Referer': 'https://bunearth.m.jd.com'
802 }
803 }
804
805 $.get(url, async (err, resp, data) => {
806 try {
807 data = JSON.parse(data);
808 console.log(data.toast.subTitle)
809 } catch (e) {
810 $.logErr(e, resp);
811 } finally {
812 resolve()
813 }
814 })
815 })
816}
817
818async function getPostRequest(type, body) {
819 let url = `https://api.m.jd.com/client.action?functionId=${type}`;

Callers 1

zooFunction · 0.70

Calls 5

isNodeMethod · 0.45
getdataMethod · 0.45
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected