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

Function getActivityDetail

jd_senbeans.js:299–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298
299async function getActivityDetail() {
300 const url = `https://draw.jdfcloud.com/common/api/bean/activity/detail?activityId=${$.activityId}&userOpenId=oPcgJ4_X7uCMeTgGmar-rmiWst1Y&timestap=${Date.now()}&userSource=mp&jdChannelId=&appId=wxccb5c536b0ecd1bf&invokeKey=qRKHmL4sna8ZOP9F`;
301 const method = `GET`;
302 const headers = {
303 'cookie' : $.cookie,
304 'openId' : `oPcgJ4_X7uCMeTgGmar-rmiWst1Y`,
305 'Connection' : `keep-alive`,
306 'App-Id' : `wxccb5c536b0ecd1bf`,
307 'content-type' : `application/json`,
308 'Host' : `draw.jdfcloud.com`,
309 'Accept-Encoding' : `gzip,compress,br,deflate`,
310 "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"),
311 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`,
312 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/733/page-frame.html`,
313 };
314 const myRequest = {url: url, method: method, headers: headers};
315 return new Promise(async resolve => {
316 $.get(myRequest, (err, resp, data) => {
317 try {
318 //console.log(data);
319 data = JSON.parse(data);
320 if(data.success){
321 $.detail = data.data;
322 }
323 } catch (e) {
324 //console.log(data);
325 $.logErr(e, resp)
326 } finally {
327 resolve();
328 }
329 })
330 })
331}
332function TotalBean() {
333 return new Promise(async resolve => {
334 const options = {

Callers 3

openTuanFunction · 0.85
helpMainFunction · 0.85
rewardMainFunction · 0.85

Calls 4

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

Tested by

no test coverage detected