(needLog = true)
| 250 | } |
| 251 | |
| 252 | async getUserInfo(needLog = true) { |
| 253 | const result = await this.request({ apiPath: "/user/profile" }); |
| 254 | this.userInfo = result.data || {}; |
| 255 | this.saveCachedToken(); |
| 256 | if (needLog) { |
| 257 | const name = this.userInfo.nickName || this.userInfo.nickname || this.userInfo.name || this.userInfo.id || "未知"; |
| 258 | const mobile = this.userInfo.mobile ? ` ${maskPhone(this.userInfo.mobile)}` : ""; |
| 259 | const points = this.userInfo.points ?? this.userInfo.memberPoints ?? "未知"; |
| 260 | $.log(`账号[${this.index}] 用户: ${name}${mobile} 积分=${points} 今日签到=${this.userInfo.todayIsCheckIn ? "是" : "否"}`); |
| 261 | } |
| 262 | return this.userInfo; |
| 263 | } |
| 264 | |
| 265 | async signIn() { |
| 266 | try { |
no test coverage detected