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

Method doSign

wxapp/hrj.js:271–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269 }
270
271 async doSign() {
272 try {
273 const info = await this.getSignMainInfo();
274 if (info.hasSign) {
275 $.log(`账号[${this.index}] 今日已签到`);
276 return;
277 }
278
279 const data = await this.request("/onecrm/mactivity/sign/misc/sign/activity/core/c/sign", {
280 customInfo: this.customInfo(),
281 });
282 const rewards = [
283 rewardText(data?.fixedReward),
284 rewardText(data?.extraReward),
285 ].filter(Boolean).join(" ");
286 $.log(`账号[${this.index}] 签到成功${rewards ? `: ${rewards}` : ""}`);
287 } catch (e) {
288 const message = e.message || e;
289 if (/已签|重复|今日已|60070013000332/.test(String(message))) {
290 $.log(`账号[${this.index}] 今日已签到`);
291 return;
292 }
293 $.log(`账号[${this.index}] 签到失败: ${message}`);
294 if (isTokenError(message)) this.removeCachedToken();
295 }
296 }
297}
298
299!(async () => {

Callers 1

runMethod · 0.95

Calls 7

getSignMainInfoMethod · 0.95
requestMethod · 0.95
customInfoMethod · 0.95
removeCachedTokenMethod · 0.95
rewardTextFunction · 0.70
isTokenErrorFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected