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

Function taskPostUrl

jd_xtg.js:531–562  ·  view source on GitHub ↗
(functionId, t, a)

Source from the content-addressed store, hash-verified

529// });
530// }
531function taskPostUrl(functionId, t, a) {
532 let o = '', r = '';
533 const time = Date.now();
534 // if (t === 'getBrowsePrize') {
535 // o = "07035cabb557f096" + (time + 6 * 1000);
536 // r = (time + 6 * 1000).toString()
537 // } else {
538 // o = "07035cabb557f096" + time;
539 // r = time.toString();
540 // }
541 o = "07035cabb557f096" + time;
542 r = time.toString();
543 // let t = "/khc/task/doQuestion";
544 // let a = "brandId=555555&questionId=2&result=1"
545 return {
546 url: `${JD_API_HOST}/${functionId}`,
547 body: a,
548 headers: {
549 Accept: "application/json,text/plain, */*",
550 "Content-Type": "application/x-www-form-urlencoded",
551 "Accept-Encoding": "gzip, deflate, br",
552 "Accept-Language": "zh-cn",
553 Connection: "keep-alive",
554 Cookie: cookie,
555 Host: "guardianstarjd.m.jd.com",
556 Referer: "https://guardianstarjd.m.jd.com/",
557 sign: za(a, o, t).toString(),
558 timestamp: r,
559 "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
560 }
561 }
562}
563function jsonParse(str) {
564 if (typeof str == "string") {
565 try {

Callers 8

initSuportInfoFunction · 0.70
starRankingFunction · 0.70
getHomePageFunction · 0.70
doTaskFunction · 0.70
getBrowsePrizeFunction · 0.70
doSupportFunction · 0.70
indexInfoFunction · 0.70
lotteryFunction · 0.70

Calls 1

zaFunction · 0.70

Tested by

no test coverage detected