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

Method run

wxapp/nissin.js:70–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

nissin.jsFile · 0.45

Calls 10

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
getUserMethod · 0.95
getSignInInfoMethod · 0.95
doSignMethod · 0.95
enterGameMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected