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

Method run

wxapp/jyxe.js:71–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

jyxe.jsFile · 0.45

Calls 7

getCachedTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
doSignMethod · 0.95
saveCachedTokenMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected