| 186 | } |
| 187 | |
| 188 | async querySignInfo(prefix = "签到信息") { |
| 189 | const range = this.signRange(); |
| 190 | const res = await this.api( |
| 191 | MEMBER_HOST, |
| 192 | "member/activity/queryRecentSign", |
| 193 | { startDate: range.startDate, endDate: range.endDate }, |
| 194 | true |
| 195 | ); |
| 196 | const data = res.result || res.data || {}; |
| 197 | const list = Array.isArray(data.dailyList) ? data.dailyList : []; |
| 198 | this.today = list.find((item) => item.isToday || item.date === range.todayDate) || {}; |
| 199 | $.log( |
| 200 | `${prefix}:今日${this.today.isSigned ? "已签到" : "未签到"},可得积分=${this.today.pointsEarned ?? "未知"},连续=${data.continuousDays ?? 0}天,总积分=${data.totalPoints ?? "未知"}` |
| 201 | ); |
| 202 | return data; |
| 203 | } |
| 204 | |
| 205 | async sign() { |
| 206 | if (this.today?.isSigned) { |