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

Function getPetTaskConfig

jd_joy.js:711–742  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

709 })
710}
711function getPetTaskConfig() {
712 return new Promise(resolve => {
713 // const url = `${weAppUrl}/getPetTaskConfig?reqSource=weapp`;
714 // const host = `jdjoy.jd.com`;
715 // const reqSource = 'h5';
716 const host = `draw.jdfcloud.com`;
717 const reqSource = 'weapp';
718 let opt = {
719 // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5",
720 url: "//draw.jdfcloud.com//common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC",
721 method: "GET",
722 data: {},
723 credentials: "include",
724 header: {"content-type": "application/json"}
725 }
726 const url = "https:"+ taroRequest(opt)['url']
727 $.get(taskUrl(url.replace(/reqSource=h5/, 'reqSource=weapp'), host, reqSource), (err, resp, data) => {
728 try {
729 if (err) {
730 console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️')
731 } else {
732 // console.log('JSON.parse(data)', JSON.parse(data))
733 $.getPetTaskConfigRes = JSON.parse(data);
734 }
735 } catch (e) {
736 $.logErr(e, resp);
737 } finally {
738 resolve();
739 }
740 })
741 })
742}
743//查询赛跑信息API
744function getPetRace() {
745 return new Promise(resolve => {

Callers 1

jdJoyFunction · 0.85

Calls 5

taroRequestFunction · 0.70
taskUrlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected