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

Method getLoginCode

wxapp/hezj.js:101–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 }
100
101 async getLoginCode() {
102 if (!process.env.wx_auth) throw new Error("缺少 wx_auth,无法从 wx_server 获取 code");
103 const { data } = await wechat.getCode(this.openid);
104 const code = data?.code || data?.data?.code;
105 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
106 return code;
107 }
108
109 async loginByWxCode() {
110 try {

Callers 1

loginByWxCodeMethod · 0.95

Calls 1

getCodeMethod · 0.45

Tested by

no test coverage detected