| 212 | } |
| 213 | |
| 214 | async getUserInfo() { |
| 215 | try { |
| 216 | const info = assertOk( |
| 217 | await this.requestWithRelogin("GET", "/iclick-new/usercenter/getUserDetails"), |
| 218 | "查询用户信息" |
| 219 | ); |
| 220 | this.userId = info.userId || this.userId; |
| 221 | this.saveCache({ userName: info.userName || "", totalPoints: info.totalPoints || "" }); |
| 222 | $.log(`账号[${this.index}] 用户: ${info.userName || mask(info.userId || "")},积分 ${info.totalPoints ?? "未知"}`); |
| 223 | return info; |
| 224 | } catch (e) { |
| 225 | $.log(`账号[${this.index}] 用户信息查询失败: ${e.message || e}`); |
| 226 | return {}; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | async getSignInfo() { |
| 231 | return assertOk( |