| 169 | } |
| 170 | |
| 171 | async querySignHeader() { |
| 172 | const { status, data } = await request({ |
| 173 | method: "GET", |
| 174 | url: `${SIGN_BASE}/game/sign_header`, |
| 175 | headers: signHeaders(this.sId), |
| 176 | }); |
| 177 | if (status !== 200 || !ok(data)) throw new Error(`签到查询失败 HTTP ${status}: ${short(data)}`); |
| 178 | |
| 179 | const info = data?.content || {}; |
| 180 | this.log( |
| 181 | `签到信息: 今日${info.signToday ? "已签" : "未签"},签到积分: ${info.point ?? "-"},会员积分: ${ |
| 182 | info.memberPoint ?? "-" |
| 183 | },年签到: ${info.yearSignInCount ?? "-"},下个奖励: ${info.nextAwardName || "-"}` |
| 184 | ); |
| 185 | return info; |
| 186 | } |
| 187 | |
| 188 | async sign() { |
| 189 | const before = await this.querySignHeader(); |