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

Method getWxCode

wxapp/fuyouhui.js:170–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 }
169
170 async getWxCode() {
171 if (!this.openid) return "";
172 const { data } = await wechat.getCode(this.openid);
173 if (!data?.status) throw new Error(data?.message || "wx_server 获取 code 失败");
174 const code = data.data?.code || data.code;
175 if (!code) throw new Error(`wx_server 未返回 code: ${JSON.stringify(data)}`);
176 this.wxcode = code;
177 return code;
178 }
179
180 async getOperateData() {
181 if (!this.openid) throw new Error("缺少 openid,无法自动授权");

Callers 1

runMethod · 0.95

Calls 1

getCodeMethod · 0.45

Tested by

no test coverage detected