()
| 223 | } |
| 224 | |
| 225 | async getSignList() { |
| 226 | try { |
| 227 | const data = await this.request({ |
| 228 | method: "GET", |
| 229 | apiPath: "/pointsSign/user/sign/list", |
| 230 | params: { v4Flag: true }, |
| 231 | }); |
| 232 | const today = formatDate(); |
| 233 | const todayItem = Array.isArray(data) ? data.find((item) => item?.isToday || item?.dateStr === today) : null; |
| 234 | this.todayDate = todayItem?.dateStr || today; |
| 235 | this.isTodaySign = Number(todayItem?.daySignStatus) === 2; |
| 236 | $.log(`账号[${this.index}] 签到状态: ${this.todayDate} ${this.isTodaySign ? "已签" : "未签"}`); |
| 237 | } catch (e) { |
| 238 | $.log(`账号[${this.index}] 查询签到状态失败: ${e.message || e}`); |
| 239 | if (/token|登录|授权|401/i.test(String(e.message || e))) this.removeCachedToken(); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | async doSign() { |
| 244 | if (this.isTodaySign) { |
no test coverage detected