MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / run

Method run

wxapp/fsdlb.js:95–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93 }
94
95 async run() {
96 const cached = this.getCachedToken();
97 if (cached) {
98 this.applyToken(cached);
99 $.log(`账号[${this.index}] 使用缓存token: ${shortToken(this.token)}`);
100 if (!(await this.checkToken())) {
101 this.removeCachedToken();
102 $.log(`账号[${this.index}] 缓存token失效,重新登录`);
103 }
104 }
105
106 if (!this.token) {
107 await this.loginByWxCode();
108 if (!this.token) return;
109 }
110
111 await this.info();
112 await this.signIn();
113 }
114
115 getCachedToken() {
116 const cache = readTokenCache();

Callers 1

fsdlb.jsFile · 0.45

Calls 9

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
infoMethod · 0.95
signInMethod · 0.95
shortTokenFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected