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