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

Method run

wxapp/ykb_all.js:328–349  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

326 }
327
328 async run() {
329 const cached = this.getCachedToken();
330 if (cached) {
331 this.applyToken(cached);
332 this.log(`使用缓存token ${shortToken(this.token)}`);
333 if (!(await this.checkToken())) {
334 this.removeCachedToken();
335 this.log("缓存token失效,重新登录");
336 }
337 }
338
339 if (!this.token) await this.login();
340 if (!this.token) {
341 this.summary.sign = "登录失败";
342 return this.summary;
343 }
344
345 await this.getMemberInfo();
346 const done = await this.tryMemberCheckIn();
347 if (!done) await this.tryTaskSign();
348 return this.summary;
349 }
350
351 async checkToken() {
352 try {

Callers 1

ykb_all.jsFile · 0.45

Calls 10

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
logMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginMethod · 0.95
getMemberInfoMethod · 0.95
tryMemberCheckInMethod · 0.95
tryTaskSignMethod · 0.95
shortTokenFunction · 0.70

Tested by

no test coverage detected