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

Method getLoginCode

wxapp/ykb_all.js:360–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358 }
359
360 async getLoginCode() {
361 if (!process.env.wx_auth) throw new Error("未配置 wx_auth,无法通过 wx_server 获取 code");
362 const { data } = await this.wechat.getCode(this.account);
363 const code = data?.code || data?.data?.code;
364 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
365 return code;
366 }
367
368 async login() {
369 const loginApis = [

Callers 1

loginMethod · 0.95

Calls 1

getCodeMethod · 0.45

Tested by

no test coverage detected