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

Method sign

wxapp/yichengtong.js:309–324  ·  view source on GitHub ↗
(signInfo)

Source from the content-addressed store, hash-verified

307 }
308
309 async sign(signInfo) {
310 if (!signInfo?.today?.logId) {
311 $.log(`账号[${this.index}] 未找到今日可签到记录,可能已签到或活动未开放`);
312 return;
313 }
314 const res = await this.api("post", "/client/user/sign", {
315 data: { logId: signInfo.today.logId },
316 });
317 if (res.status === 200 && ok(res.data)) {
318 $.log(`账号[${this.index}] 签到成功: ${res.data.msg || "成功"}`);
319 return;
320 }
321 const msg = res.data?.msg || res.data?.message || res.text.slice(0, 500);
322 if (/已签|重复|already/i.test(msg)) $.log(`账号[${this.index}] 今日已签到: ${msg}`);
323 else $.log(`账号[${this.index}] 签到失败[${res.status}]: ${msg}`);
324 }
325
326 async queryTaskHome() {
327 const res = await this.api("get", "/client/user/taskHome");

Callers 1

runMethod · 0.95

Calls 3

apiMethod · 0.95
okFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected