()
| 263 | } |
| 264 | |
| 265 | async signIn() { |
| 266 | try { |
| 267 | if (Number(this.userInfo.todayIsCheckIn) === 1 || this.userInfo.todayIsCheckIn === true) { |
| 268 | $.log(`账号[${this.index}] 今日已签到`); |
| 269 | return; |
| 270 | } |
| 271 | |
| 272 | const result = await this.request({ |
| 273 | method: "POST", |
| 274 | apiPath: "/user/check-in-record/check-in", |
| 275 | data: {}, |
| 276 | }); |
| 277 | $.log(`账号[${this.index}] 签到成功: ${result.message || result.msg || "ok"}`); |
| 278 | await this.getUserInfo(false); |
| 279 | } catch (e) { |
| 280 | $.log(`账号[${this.index}] 签到失败: ${e.message || e}`); |
| 281 | if (isTokenError(e)) this.removeCachedToken(); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | async getRecentSignIn() { |
| 286 | try { |
no test coverage detected