MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / lottery_task

Method lottery_task

xiaosatonglu.js:244–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242 }
243
244 async lottery_task() {
245 let expando = "jQuery" + ("1.7.1" + Math.random()).replace(/\D/g, "");
246 let time1 = new Date().getTime();
247 let time2 = new Date().getTime();
248 try {
249 let options = {
250 fn: "执行抽奖",
251 method: "get",
252 url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/Home/ChoujiangNew/apiChoujiang&callback=${expando}_${time1}&openId=${this.accountId}&action=cj&typeId=122&address=&userid=${this.wxopenId}&_=${time2}`,
253 headers: this.get_headers(),
254 };
255 let { body: result } = await httpRequest(options);
256 //console.log(options);
257 //result = JSON.parse(result);
258 result = result.replace(`${expando}_${time1}`, "")
259 result = result.replace(`(`, "")
260 result = result.replace(`)`, "")
261 result = JSON.parse(result)
262 $.log(JSON.stringify(result))
263 } catch (e) {
264 console.log(e);
265 }
266 }
267 //
268
269 async art_list(channelId) {

Callers 1

lottery_numMethod · 0.95

Calls 4

get_headersMethod · 0.95
getTimeMethod · 0.80
httpRequestFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected