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

Method querySignInfo

wxapp/ztkd.js:188–203  ·  view source on GitHub ↗
(prefix = "签到信息")

Source from the content-addressed store, hash-verified

186 }
187
188 async querySignInfo(prefix = "签到信息") {
189 const range = this.signRange();
190 const res = await this.api(
191 MEMBER_HOST,
192 "member/activity/queryRecentSign",
193 { startDate: range.startDate, endDate: range.endDate },
194 true
195 );
196 const data = res.result || res.data || {};
197 const list = Array.isArray(data.dailyList) ? data.dailyList : [];
198 this.today = list.find((item) => item.isToday || item.date === range.todayDate) || {};
199 $.log(
200 `${prefix}:今日${this.today.isSigned ? "已签到" : "未签到"},可得积分=${this.today.pointsEarned ?? "未知"},连续=${data.continuousDays ?? 0}天,总积分=${data.totalPoints ?? "未知"}`
201 );
202 return data;
203 }
204
205 async sign() {
206 if (this.today?.isSigned) {

Callers 1

runMethod · 0.95

Calls 3

signRangeMethod · 0.95
apiMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected