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

Method getOpenId

wxapp/wx_xlxyh.js:163–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161 }
162
163 async getOpenId() {
164 $.log("🔍 尝试获取openId...");
165 const openIdRes = await this.request(
166 "GET",
167 `/qualcomm-app/api/user/info?userId=${this.userId}`,
168 null,
169 {},
170 true
171 );
172
173 if (openIdRes.code === 200 && openIdRes.data) {
174 this.openId = openIdRes.data.openId || "";
175 $.log(`✅ 获取到openId: ${this.openId || "空"}`);
176 return true;
177 } else {
178 $.log(`❌ 获取openId失败: ${openIdRes.message}`);
179 return false;
180 }
181 }
182
183 async run() {
184 if (!this.valid) {

Callers 1

runMethod · 0.95

Calls 2

requestMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected