()
| 49 | } |
| 50 | |
| 51 | async run() { |
| 52 | //随机延迟5-30s 模拟人工操作 |
| 53 | await $.wait(Math.floor(Math.random() * 20 + 5) * 1000); |
| 54 | let { data: codeRes } = await wechat.getCode(this.wcsid) |
| 55 | if (codeRes.status) { |
| 56 | await this.getUserToken(codeRes.data.code) |
| 57 | } |
| 58 | if (!this.activedAuthToken) { |
| 59 | $.log(`账号[${this.index}] 获取用户Token失败❌`) |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | await this.getUserInfo() |
| 64 | await this.getJob() |
| 65 | if (!this.isSigned) { |
| 66 | await this.doSign() |
| 67 | } |
| 68 | } |
| 69 | async getUserToken(code) { |
| 70 | const timestamp = new Date().getTime(); |
| 71 | let options = { |
no test coverage detected