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

Method requestWithRelogin

wxapp/airui.js:202–212  ·  view source on GitHub ↗
(method, urlPath, options = {})

Source from the content-addressed store, hash-verified

200 }
201
202 async requestWithRelogin(method, urlPath, options = {}) {
203 await this.ensureLogin();
204 const res = await apiRequest(method, urlPath, { ...options, token: this.token });
205 if (Number(res?.code) === -3 && this.openid) {
206 $.log(`账号[${this.index}] token失效,重新登录`);
207 this.removeToken();
208 await this.login();
209 return apiRequest(method, urlPath, { ...options, token: this.token });
210 }
211 return res;
212 }
213
214 async getUserInfo() {
215 try {

Callers 3

getUserInfoMethod · 0.95
getSignInfoMethod · 0.95
submitSignMethod · 0.95

Calls 5

ensureLoginMethod · 0.95
removeTokenMethod · 0.95
loginMethod · 0.95
apiRequestFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected