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

Method run

wxapp/yz19.js:77–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

yz19.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