()
| 396 | } |
| 397 | |
| 398 | async sign() { |
| 399 | const body = { client_type: CLIENT_TYPE }; |
| 400 | const res = await this.request("POST", CLOCK_IN, { data: body, signed: true }); |
| 401 | if (res.result === "ok") { |
| 402 | const data = res.data || {}; |
| 403 | $.log(`账号[${this.index}] 签到成功: 连续${data.continuous_days ?? data.continuousDays ?? "未知"}天`); |
| 404 | return; |
| 405 | } |
| 406 | if (res.msg === "already clocked in today") { |
| 407 | $.log(`账号[${this.index}] 今日已签到`); |
| 408 | return; |
| 409 | } |
| 410 | throw new Error(`签到失败: ${res.msg || JSON.stringify(res)}`); |
| 411 | } |
| 412 | |
| 413 | async clockInfo() { |
| 414 | try { |
no test coverage detected