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

Function appScanMarket

jd_joy.js:491–520  ·  view source on GitHub ↗
(type, body)

Source from the content-addressed store, hash-verified

489}
490//app逛会场
491function appScanMarket(type, body) {
492 return new Promise(resolve => {
493 // const url = `${JD_API_HOST}/${type}`;
494 const host = `jdjoy.jd.com`;
495 const reqSource = 'h5';
496 let opt = {
497 url: `//jdjoy.jd.com/common/pet/${type}?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`,
498 // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5",
499 method: "POST",
500 data: body,
501 credentials: "include",
502 header: {"content-type": "application/json"}
503 }
504 const url = "https:"+ taroRequest(opt)['url']
505 $.post(taskPostUrl(url, JSON.stringify(body), reqSource, host, 'application/json'), (err, resp, data) => {
506 try {
507 if (err) {
508 console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️')
509 } else {
510 // data = JSON.parse(data);
511 console.log(`京东app逛会场结果::${data}`)
512 }
513 } catch (e) {
514 $.logErr(e, resp);
515 } finally {
516 resolve(data);
517 }
518 })
519 })
520}
521
522//领取狗粮API
523function getFood(type) {

Callers 1

appPetTaskFunction · 0.85

Calls 5

taroRequestFunction · 0.70
taskPostUrlFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected