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

Method run

wxapp/qiaqia.js:91–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 async run() {
92 const cached = this.getCachedToken();
93 if (cached) {
94 this.session = cached;
95 $.log(`账号[${this.index}] 使用缓存登录态`);
96 if (!(await this.checkSession())) {
97 this.removeCachedToken();
98 $.log(`账号[${this.index}] 缓存登录态失效,重新登录`);
99 }
100 }
101
102 if (!this.session.sessionId) {
103 await this.login();
104 if (!this.session.sessionId) return;
105 }
106
107 await this.doSign();
108 this.saveCachedToken();
109 }
110
111 getCachedToken() {
112 const cache = readTokenCache();

Callers 1

qiaqia.jsFile · 0.45

Calls 7

getCachedTokenMethod · 0.95
checkSessionMethod · 0.95
removeCachedTokenMethod · 0.95
loginMethod · 0.95
doSignMethod · 0.95
saveCachedTokenMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected