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

Method checkin

wxapp/txdt.js:314–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 }
313
314 async checkin() {
315 const { today } = await this.queryCalendar("签到前");
316 if (today.checkin) {
317 $.log("签到:今日已签到");
318 return;
319 }
320 const data = await this.mapApi("/activity/v1/checkin", {
321 activity_id: ACTIVITY_ID,
322 game_id: 1,
323 rule_id: "tencent_map_checkin",
324 nick: this.userInfo.nickname || "微信用户",
325 });
326 const prizes = Array.isArray(data.prizes)
327 ? data.prizes.map((item) => `${item.name || item.type || "奖励"}:${item.amount ?? ""}`).join(",")
328 : short(data);
329 $.log(`签到:成功${prizes ? `,${prizes}` : ""}`);
330 }
331
332 async run() {
333 $.log(`\n========== ${APP.name} 账号[${this.index}] ${this.account.remark || this.account.openid} ==========`);

Callers 1

runMethod · 0.95

Calls 4

queryCalendarMethod · 0.95
mapApiMethod · 0.95
shortFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected