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

Method getWxCode

wxapp/fyzq.js:121–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 }
120
121 async getWxCode() {
122 const { data } = await wechat.getCode(this.account);
123 if (!data?.status) throw new Error(data?.message || "wx_server 获取 code 失败");
124 const code = data.data?.code || data.code;
125 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
126 return code;
127 }
128
129 async login() {
130 const code = await this.getWxCode();

Callers 1

loginMethod · 0.95

Calls 1

getCodeMethod · 0.45

Tested by

no test coverage detected