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

Method run

wxapp/fej.js:70–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 async run() {
71 const cached = this.getCachedToken();
72 if (cached) {
73 this.applyToken(cached);
74 $.log(`账号[${this.index}] 使用缓存token`);
75 if (!(await this.checkToken())) {
76 this.removeCachedToken();
77 $.log(`账号[${this.index}] 缓存token失效,重新登录`);
78 }
79 }
80
81 if (!this.token) {
82 await this.loginByWxCode();
83 if (!this.token) return;
84 }
85
86 await this.showCheckinPage();
87 await this.doCheckin();
88 await this.getPoints();
89 }
90
91 getCachedToken() {
92 const cache = readTokenCache();

Callers 1

fej.jsFile · 0.45

Calls 9

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
showCheckinPageMethod · 0.95
doCheckinMethod · 0.95
getPointsMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected