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

Method api

wxapp/yichengtong.js:276–286  ·  view source on GitHub ↗
(method, urlPath, options = {})

Source from the content-addressed store, hash-verified

274 }
275
276 async api(method, urlPath, options = {}) {
277 let res = await request(method, urlPath, { ...options, token: this.token });
278 if (res.status === 401 || Number(res.data?.code) === 401) {
279 $.log(`账号[${this.index}] token失效,尝试重新登录`);
280 this.removeToken();
281 this.token = "";
282 await this.ensureLogin();
283 res = await request(method, urlPath, { ...options, token: this.token });
284 }
285 return res;
286 }
287
288 async querySignHome() {
289 const res = await this.api("get", "/client/user/signHome");

Callers 4

querySignHomeMethod · 0.95
signMethod · 0.95
queryTaskHomeMethod · 0.95
submitTaskMethod · 0.95

Calls 4

removeTokenMethod · 0.95
ensureLoginMethod · 0.95
requestFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected