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

Function getAuthCode

wxapp/qqpcmgr.js:108–116  ·  view source on GitHub ↗
(account)

Source from the content-addressed store, hash-verified

106}
107
108async function getAuthCode(account) {
109 if (process.env.qqpcmgr_authCode) return process.env.qqpcmgr_authCode;
110 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法通过 wx_server 授权二维码");
111 if (!account) throw new Error("未配置 qqpcmgr openid,无法调用 /wx/qrcodeauth");
112 const uuid = await getQrUuid();
113 $.log(`获取 QRConnect UUID 成功: ${uuid}`);
114 const code = await qrcodeAuth(account, uuid);
115 return code;
116}
117
118async function getQrUuid() {
119 const { data, status } = await axios.request({

Callers 1

runAccountFunction · 0.85

Calls 3

getQrUuidFunction · 0.85
qrcodeAuthFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected