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

Method run

wxapp/mxbc.js:77–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 async run() {
78
79 const cachedToken = this.getCachedToken();
80 if (cachedToken) {
81 this.ck = cachedToken;
82 $.log(`账号[${this.index}] 使用缓存token验证`);
83 await this.user_info();
84 }
85
86 if (!this.ckStatus) {
87 this.removeCachedToken();
88 await this.loginByWxCode()
89 if (!this.ckStatus) return
90 await this.user_info()
91 }
92 if (!this.ckStatus) return
93 await this.getLoginUrl()
94 if (this.activityOrigin) {
95 await this.getActivityToken()
96 await this.activityIndex()
97 }
98
99 }
100 getCachedToken() {
101 const cache = readTokenCache();
102 return cache[this.wcsid]?.accessToken || "";

Callers 1

mxbc.jsFile · 0.45

Calls 8

getCachedTokenMethod · 0.95
user_infoMethod · 0.95
removeCachedTokenMethod · 0.95
loginByWxCodeMethod · 0.95
getLoginUrlMethod · 0.95
getActivityTokenMethod · 0.95
activityIndexMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected