()
| 228 | } |
| 229 | |
| 230 | async doCheckin() { |
| 231 | if (!this.checkinId) { |
| 232 | $.log(`账号[${this.index}] 未获取到 checkinId,跳过签到`); |
| 233 | return; |
| 234 | } |
| 235 | try { |
| 236 | const data = await this.request({ |
| 237 | path: "/wscump/checkin/checkinV2.json", |
| 238 | params: { checkinId: this.checkinId }, |
| 239 | }); |
| 240 | const awards = (data?.list || []).map((item) => item?.infos?.title).filter(Boolean).join(", "); |
| 241 | $.log(`账号[${this.index}] 签到成功: ${data?.desc || ""}${awards ? ` ${awards}` : ""}`); |
| 242 | } catch (e) { |
| 243 | const message = String(e.message || e); |
| 244 | if (/已达最大参与次数|已签到|重复签到/.test(message)) { |
| 245 | $.log(`账号[${this.index}] 今日已签到`); |
| 246 | return; |
| 247 | } |
| 248 | $.log(`账号[${this.index}] 签到失败: ${message}`); |
| 249 | if (/access_token|token|登录|授权|invalid session/i.test(message)) this.removeCachedToken(); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | async getPoints() { |
| 254 | try { |
no test coverage detected