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

Method getLoginCode

wxapp/roki.js:211–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209 }
210
211 async getLoginCode() {
212 if (!process.env.wx_auth) throw new Error("缺少 wx_auth,无法从 wx_server 获取 code");
213 const { data } = await wechat.getCode(this.account);
214 const code = data && (data.code || (data.data && data.data.code));
215 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
216 return code;
217 }
218
219 async loginByWxCode() {
220 try {

Callers 1

loginByWxCodeMethod · 0.95

Calls 1

getCodeMethod · 0.45

Tested by

no test coverage detected