MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / getUserInfo

Method getUserInfo

wxapp/airui.js:214–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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(

Callers 1

runMethod · 0.95

Calls 5

requestWithReloginMethod · 0.95
saveCacheMethod · 0.95
assertOkFunction · 0.70
maskFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected