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

Method queryUserInfo

wxapp/hezj.js:140–159  ·  view source on GitHub ↗
(accountToken)

Source from the content-addressed store, hash-verified

138 }
139
140 async queryUserInfo(accountToken) {
141 const path = "/api-gw/oauthserver/applet/v1/userinfo/query";
142 let options = {
143 method: "POST",
144 url: API_HOST + path,
145 path,
146 isSign256: true,
147 isHeaderDelToken: true,
148 data: { accountToken },
149 };
150 const { data: result } = await this.request(options);
151 if (result?.retCode !== "00000" && result?.code !== 200 && !result?.success) {
152 throw new Error(result?.retInfo || result?.message || JSON.stringify(result));
153 }
154 const info = result?.data?.userinfo || {};
155 const name = info.nickName || info.nickname || info.userName || "未知用户";
156 const phone = info.mobile || info.phoneNumber || "";
157 $.log(`账号[${this.index}] 用户: ${name}${phone ? ` ${phone.slice(0, 3)}****${phone.slice(-4)}` : ""}`);
158 return info;
159 }
160
161 async pointInfo() {
162 const path = "/zjapi/zjBaseServer/signDetail/getUserPointsAndWallet";

Callers 1

loginByWxCodeMethod · 0.95

Calls 2

requestMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected