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

Method queryCalendar

wxapp/txdt.js:300–312  ·  view source on GitHub ↗
(prefix = "签到状态")

Source from the content-addressed store, hash-verified

298 }
299
300 async queryCalendar(prefix = "签到状态") {
301 const data = await this.mapApi("/activity/v1/checkin/calendar", {
302 activity_id: ACTIVITY_ID,
303 game_id: 1,
304 rule_id: "tencent_map_checkin",
305 });
306 const today = data.calendar?.[this.todayKey()] || {};
307 const prizes = Array.isArray(today.prizes)
308 ? today.prizes.map((item) => `${item.name || item.type || "奖励"}:${item.amount ?? ""}`).join(",")
309 : "";
310 $.log(`${prefix}:今日${today.checkin ? "已签" : "未签"},周期已签=${data.checkin_days || 0}/${data.period || 0}${prizes ? `,奖励=${prizes}` : ""}`);
311 return { data, today };
312 }
313
314 async checkin() {
315 const { today } = await this.queryCalendar("签到前");

Callers 2

checkinMethod · 0.95
runMethod · 0.95

Calls 3

mapApiMethod · 0.95
todayKeyMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected