()
| 256 | } |
| 257 | |
| 258 | async getSignList() { |
| 259 | try { |
| 260 | const data = await this.request({ |
| 261 | method: "GET", |
| 262 | apiPath: "/pointsSign/user/sign/list", |
| 263 | params: { v4Flag: true }, |
| 264 | }); |
| 265 | const today = formatDate(); |
| 266 | const todayItem = Array.isArray(data) ? data.find((item) => item?.isToday || item?.dateStr === today) : null; |
| 267 | this.todayDate = todayItem?.dateStr || today; |
| 268 | this.isTodaySign = Number(todayItem?.daySignStatus) === 2 || Boolean(todayItem?.sign); |
| 269 | $.log(`账号[${this.index}] 签到状态: ${this.todayDate} ${this.isTodaySign ? "已签" : "未签"}`); |
| 270 | } catch (e) { |
| 271 | const message = e.message || e; |
| 272 | $.log(`账号[${this.index}] 查询签到状态失败: ${message}`); |
| 273 | if (/token|登录|授权|401/i.test(String(message))) this.removeCachedToken(); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | async doSign() { |
| 278 | if (this.isTodaySign) { |
no test coverage detected