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

Method run

wxapp/bluedash.js:65–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

bluedash.jsFile · 0.45

Calls 9

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
getSignListMethod · 0.95
doSignMethod · 0.95
getUserMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected