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

Method getUser

wxapp/nissin.js:215–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 }
214
215 async getUser() {
216 try {
217 const data = await this.request({ apiPath: "/auth/user/current" });
218 this.user = data || {};
219 this.saveCachedToken();
220 $.log(`账号[${this.index}] 用户: ${data?.nickname || data?.name || ""} ${maskPhone(data?.mobile) || ""}`);
221 } catch (e) {
222 $.log(`账号[${this.index}] 查询用户失败: ${e.message || e}`);
223 if (isTokenError(e)) this.removeCachedToken();
224 }
225 }
226
227 async getSignInInfo(silent = false) {
228 const data = await this.request({ apiPath: "/sign-in/statistics" });

Callers 1

runMethod · 0.95

Calls 6

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

Tested by

no test coverage detected