()
| 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) { |
no test coverage detected