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

Function help

jd_senbeans.js:220–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218}
219
220async function help() {
221 await new Promise((resolve) => {
222 let options = {
223 "url": `https://draw.jdfcloud.com/common/api/bean/activity/participate?activityId=${$.activityId}&inviteUserPin=${encodeURIComponent($.oneTuanInfo['user'])}&invokeKey=qRKHmL4sna8ZOP9F&timestap=${Date.now()}`,
224 "headers": {
225 'content-type' : `application/json`,
226 'Connection' : `keep-alive`,
227 'Accept-Encoding' : `gzip,compress,br,deflate`,
228 'App-Id' : `wxccb5c536b0ecd1bf`,
229 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`,
230 "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"),
231 'openId' : `oPcgJ4_X7uCMeTgGmar-rmiWst1Y`,
232 'Host' : `draw.jdfcloud.com`,
233 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/733/page-frame.html`,
234 'cookie' : $.cookie,
235 }
236 };
237 $.post(options, (err, resp, res) => {
238 try {
239 if (res) {
240 res = JSON.parse(res);
241 if(res.data.result === 5){
242 $.oneTuanInfo['completed'] = true;
243 }else if(res.data.result === 0 || res.data.result === 1){
244 $.canHelp = false;
245 }
246 console.log(JSON.stringify(res));
247 }
248 } catch (e) {
249 console.log(e);
250 } finally {
251 resolve(res);
252 }
253 })
254 });
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`;

Callers 1

helpMainFunction · 0.70

Calls 4

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

Tested by

no test coverage detected