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

Method signIn

wxapp/roki.js:265–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 async signIn() {
266 try {
267 if (Number(this.userInfo.todayIsCheckIn) === 1 || this.userInfo.todayIsCheckIn === true) {
268 $.log(`账号[${this.index}] 今日已签到`);
269 return;
270 }
271
272 const result = await this.request({
273 method: "POST",
274 apiPath: "/user/check-in-record/check-in",
275 data: {},
276 });
277 $.log(`账号[${this.index}] 签到成功: ${result.message || result.msg || "ok"}`);
278 await this.getUserInfo(false);
279 } catch (e) {
280 $.log(`账号[${this.index}] 签到失败: ${e.message || e}`);
281 if (isTokenError(e)) this.removeCachedToken();
282 }
283 }
284
285 async getRecentSignIn() {
286 try {

Callers 1

runMethod · 0.95

Calls 5

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

Tested by

no test coverage detected