()
| 437 | } |
| 438 | |
| 439 | async getLotteryNum() { |
| 440 | try { |
| 441 | const result = await this.request("/lucky/activity/opporturnity", { |
| 442 | params: { activityCode: `jfcj${this.activity_code}` }, |
| 443 | }); |
| 444 | if (result?.can_use > 0) { |
| 445 | $.log(`当前剩余抽奖次数:${result.can_use}`); |
| 446 | for (let can = 0; can < result.can_use; can++) { |
| 447 | await this.doLottery(); |
| 448 | } |
| 449 | } else { |
| 450 | $.log("当前剩余抽奖次数0"); |
| 451 | } |
| 452 | } catch (e) { |
| 453 | $.log(`查询抽奖次数失败:${e.message || e}`); |
| 454 | } |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | !(async () => { |