()
| 259 | } |
| 260 | |
| 261 | async userInfoRequest() { |
| 262 | if (!this.userId) return; |
| 263 | try { |
| 264 | const result = await this.request("v3/user", { userId: this.userId }, { method: "GET" }); |
| 265 | this.userInfo = result?.Data || this.userInfo; |
| 266 | this.saveCachedToken(); |
| 267 | const name = this.userInfo?.nickname || this.userInfo?.username || this.userInfo?.userName || this.userId; |
| 268 | const score = this.userInfo?.score ?? this.userInfo?.points ?? this.userInfo?.coolCoin ?? "未知"; |
| 269 | $.log(`账号[${this.index}] 用户:${maskName(name)} 酷币:${score}`); |
| 270 | } catch (e) { |
| 271 | const message = String(e.message || e); |
| 272 | $.log(`账号[${this.index}] 获取用户信息失败:${message}`); |
| 273 | if (isTokenError(message)) this.removeCachedToken(); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | async getDrawNum() { |
| 278 | try { |
no test coverage detected