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

Function takeGetRequest

jd_zoo.js:756–784  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

754 }
755}
756function takeGetRequest(){
757 return new Promise(async resolve => {
758 $.get({
759 url:`https://ms.jr.jd.com/gw/generic/mission/h5/m/finishReadMission?reqData={%22missionId%22:%22${$.taskId}%22,%22readTime%22:8}`,
760 headers:{
761 'Origin' : `https://prodev.m.jd.com`,
762 'Cookie': $.cookie,
763 'Connection' : `keep-alive`,
764 'Accept' : `*/*`,
765 'Referer' : `https://prodev.m.jd.com`,
766 'Host' : `ms.jr.jd.com`,
767 '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"),
768 'Accept-Encoding' : `gzip, deflate, br`,
769 'Accept-Language' : `zh-cn`
770 }
771 }, (err, resp, data) => {
772 try {
773 data = JSON.parse(data);
774 if (data.resultCode === 0) {
775 console.log(`任务完成`);
776 }
777 } catch (e) {
778 $.logErr(e, resp)
779 } finally {
780 resolve();
781 }
782 })
783 })
784}
785
786//领取奖励
787function callbackResult(info) {

Callers 1

zooFunction · 0.70

Calls 5

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

Tested by

no test coverage detected