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

Method getUserInfo

wxapp/roki.js:252–263  ·  view source on GitHub ↗
(needLog = true)

Source from the content-addressed store, hash-verified

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 {

Callers 3

runMethod · 0.95
checkTokenMethod · 0.95
signInMethod · 0.95

Calls 4

requestMethod · 0.95
saveCachedTokenMethod · 0.95
maskPhoneFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected