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

Function main

tools/jd_cfd_SlotMachine.js:61–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59})()
60
61function main() {
62 slotTimes++
63 return new Promise(async resolve => {
64 try {
65 if (slotTimes !== 10) {
66 let url = `https://m.jingxi.com/jxcfd/consume/SlotMachine?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=138631.26.55&dwType=0&dwQueryPri=1&_stk=_cfd_t%2CbizCode%2CdwEnv%2CdwQueryPri%2CdwType%2Cptag%2Csource%2CstrZone&_ste=1&_=${Date.now()}&sceneval=2`
67 let h5st = decrypt(Date.now(), '_cfd_t,bizCode,ddwConfVersion,dwEnv,ptag,source,strCouponPool,strGoodsPool,strZone', '', url)
68 url += '&h5st=' + h5st
69 $.get({
70 url: url,
71 headers: {
72 'Host': 'm.jingxi.com',
73 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require(`${path}/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"),
74 'accept-language': 'zh-cn',
75 'referer': 'https://st.jingxi.com/',
76 'cookie': cookie
77 }
78 }, async (err, resp, data) => {
79 data = JSON.parse(data)
80 console.log(data)
81 if (data['strPrizeName'] === '金元宝') {
82 console.log("恭喜这个B!")
83 resolve();
84 } else if (data['strPrizeName']) {
85 console.log(`抽到了${data['strPrizeName']}`)
86 await $.wait(4000)
87 await main()
88 } else {
89 resolve();
90 }
91 })
92 }
93 } catch (e) {
94 console.log('抽奖Error: ', e)
95 resolve();
96 }
97 })
98}
99
100function goods() {
101 return new Promise(resolve => {

Callers

nothing calls this directly

Calls 6

decryptFunction · 0.70
getMethod · 0.45
isNodeMethod · 0.45
getdataMethod · 0.45
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected