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

Function question

wanda/wanda.js:142–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140
141// 获取题目答案
142function question() {
143 return new Promise((resolve) => {
144 const questionVal = getKey()['key']+'/question/question_list.apiactivityCode='+$.questionCode
145 mx_api['ts'] = getKey()['ts']
146 mx_api['check'] = hex_md5(questionVal)
147 const url = {
148 url:'https://activity-api-mx.wandafilm.com/question/question_list.api',
149 headers:{
150 'MX-API':JSON.stringify(mx_api),
151 },
152 body : 'activityCode='+$.questionCode
153 }
154 $.post(url, (err, resp, data) => {
155 try {
156 const res = JSON.parse(data)
157 $.answer = res.data.questionList[0].movie.nameCN
158 } catch (e) {
159 $.logErr(e, resp)
160 } finally {
161 resolve()
162 }
163 })
164 })
165}
166
167// 答题
168function answer() {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…