(silent = false)
| 251 | } |
| 252 | |
| 253 | async getUser(silent = false) { |
| 254 | const result = await this.request("marketing/shyx/marketing/v1/cus/get-user-info", { |
| 255 | openId: this.appOpenid, |
| 256 | enterpriseNo: ENTERPRISE_NO, |
| 257 | }, "GET"); |
| 258 | const user = result.data || {}; |
| 259 | this.userId = user.id || this.userId; |
| 260 | this.mobile = user.mobile || this.mobile; |
| 261 | this.currentJf = user.currentJf ?? this.currentJf; |
| 262 | this.saveCachedToken(); |
| 263 | if (!silent) $.log(`账号[${this.index}] 用户: userId=${this.userId || "未知"} 能量${this.currentJf ?? 0}`); |
| 264 | return user; |
| 265 | } |
| 266 | |
| 267 | async signIn() { |
| 268 | try { |
no test coverage detected