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

Function invite

jd_senbeans.js:257–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

255}
256
257async function invite() {
258 const url = `https://draw.jdfcloud.com/common/api/bean/activity/invite?openId=oPcgJ4_X7uCMeTgGmar-rmiWst1Y&activityId=${$.activityId}&userSource=mp&formId=123&jdChannelId=&fp=&appId=wxccb5c536b0ecd1bf&invokeKey=qRKHmL4sna8ZOP9F`;
259 const method = `POST`;
260 const headers = {
261 'content-type' : `application/json`,
262 'Connection' : `keep-alive`,
263 'Accept-Encoding' : `gzip,compress,br,deflate`,
264 'App-Id' : `wxccb5c536b0ecd1bf`,
265 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`,
266 "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"),
267 'openId' : `oPcgJ4_X7uCMeTgGmar-rmiWst1Y`,
268 'Host' : `draw.jdfcloud.com`,
269 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/733/page-frame.html`,
270 'cookie' : $.cookie,
271 };
272 const body = `{}`;
273 const myRequest = {
274 url: url,
275 method: method,
276 headers: headers,
277 body: body
278 };
279 return new Promise(async resolve => {
280 $.post(myRequest, (err, resp, data) => {
281 try {
282 data = JSON.parse(data);
283 if(data.success){
284 console.log(`发起瓜分成功`);
285 }else{
286 console.log(JSON.stringify(data));
287 }
288 } catch (e) {
289 console.log(data);
290 $.logErr(e, resp)
291 } finally {
292 resolve();
293 }
294 })
295 })
296}
297
298
299async function getActivityDetail() {

Callers 1

openTuanFunction · 0.70

Calls 5

isNodeMethod · 0.45
getdataMethod · 0.45
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected