MCPcopy Index your code
hub / github.com/chavyleung/scripts / lottery

Function lottery

wanda/wanda.js:92–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92function lottery() {
93 return new Promise((resolve) => {
94 const signVal = getKey()['key'] + '/activityWholeSign/prize/lottery.apiactivityCode='+$.signCode+'&vcode=&requestId='
95 mx_api['ts'] = getKey()['ts']
96 mx_api['check'] = hex_md5(signVal)
97 const url = {
98 url:'https://activity-api-mx.wandafilm.com/activityWholeSign/prize/lottery.api',
99 headers:{
100 'MX-API':JSON.stringify(mx_api),
101 },
102 body : 'activityCode='+$.signCode+'&vcode=&requestId='
103 }
104 $.post(url, (err, resp, data) => {
105 try {
106 $.lottery = JSON.parse(data)
107 console.log(data)
108 } catch (e) {
109 $.logErr(e, resp)
110 } finally {
111 resolve()
112 }
113 })
114 })
115}
116
117function question_() {
118 return new Promise((resolve) => {

Callers 1

wanda.jsFile · 0.70

Calls 5

getKeyFunction · 0.85
hex_md5Function · 0.85
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…