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

Method run

wxapp/yz9d.js:73–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

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