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

Method run

wxapp/yunduodingding.js:74–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 async run() {
75 const cached = this.getCachedToken();
76 if (cached) {
77 this.token = cached;
78 $.log(`账号[${this.index}] 使用缓存token: ${maskToken(this.accessToken)}`);
79 if (!(await this.checkToken())) {
80 this.removeCachedToken();
81 $.log(`账号[${this.index}] 缓存token失效,重新code登录`);
82 }
83 }
84
85 if (!this.accessToken) {
86 await this.loginByWxCode();
87 if (!this.accessToken) return;
88 }
89
90 await this.getPoints("签到前");
91 await this.getCheckinInfo();
92 await this.doCheckin();
93 await this.getPoints("签到后");
94 }
95
96 getCachedToken() {
97 const cache = readTokenCache();

Callers 1

yunduodingding.jsFile · 0.45

Calls 9

getCachedTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
getPointsMethod · 0.95
getCheckinInfoMethod · 0.95
doCheckinMethod · 0.95
maskTokenFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected