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

Method doSign

wxapp/jyxe.js:184–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182 }
183
184 async doSign() {
185 try {
186 const res = await this.request("/api/Person/sign");
187 const beans = res.data;
188 $.log(`账号[${this.index}] 签到成功${beans !== undefined ? `,获得${beans}环保币` : ""}`);
189 } catch (e) {
190 const message = e.message || e;
191 if (/已签到|今日已|重复|已经签到/.test(String(message))) {
192 $.log(`账号[${this.index}] 今日已签到`);
193 return;
194 }
195 $.log(`账号[${this.index}] 签到失败: ${message}`);
196 if (isTokenError(message)) this.removeCachedToken();
197 }
198 }
199}
200
201!(async () => {

Callers 1

runMethod · 0.95

Calls 4

requestMethod · 0.95
removeCachedTokenMethod · 0.95
isTokenErrorFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected