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

Method getCode

wxapp/jingjianx_all.js:291–297  ·  view source on GitHub ↗
(openid)

Source from the content-addressed store, hash-verified

289 }
290
291 async getCode(openid) {
292 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法通过 wx_server 获取 code");
293 const { data } = await this.wx.getCode(openid);
294 const code = data?.code || data?.data?.code;
295 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
296 return code;
297 }
298
299 headers(shopId = "", token = "", extra = {}) {
300 const headers = {

Callers 1

loginMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected