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

Method run

wxapp/jingyoujia.js:78–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76 }
77
78 async run() {
79 const cached = this.getCachedToken();
80 if (cached) {
81 this.applyToken(cached);
82 $.log(`账号[${this.index}] 使用缓存token`);
83 if (!(await this.checkToken())) {
84 this.removeCachedToken();
85 $.log(`账号[${this.index}] 缓存token失效,重新登录`);
86 }
87 }
88
89 if (!this.token) {
90 await this.loginByWxCode();
91 if (!this.token) return;
92 }
93
94 await this.getCustomerDetails();
95 await this.getIntegral();
96 await this.findCheckTask();
97 await this.queryRecord();
98 await this.signIn();
99 await this.getIntegral();
100 }
101
102 getCachedToken() {
103 const cache = readTokenCache();

Callers 1

jingyoujia.jsFile · 0.45

Calls 11

getCachedTokenMethod · 0.95
applyTokenMethod · 0.95
checkTokenMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
getCustomerDetailsMethod · 0.95
getIntegralMethod · 0.95
findCheckTaskMethod · 0.95
queryRecordMethod · 0.95
signInMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected