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

Method getSignList

wxapp/fafa.js:258–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256 }
257
258 async getSignList() {
259 try {
260 const data = await this.request({
261 method: "GET",
262 apiPath: "/pointsSign/user/sign/list",
263 params: { v4Flag: true },
264 });
265 const today = formatDate();
266 const todayItem = Array.isArray(data) ? data.find((item) => item?.isToday || item?.dateStr === today) : null;
267 this.todayDate = todayItem?.dateStr || today;
268 this.isTodaySign = Number(todayItem?.daySignStatus) === 2 || Boolean(todayItem?.sign);
269 $.log(`账号[${this.index}] 签到状态: ${this.todayDate} ${this.isTodaySign ? "已签" : "未签"}`);
270 } catch (e) {
271 const message = e.message || e;
272 $.log(`账号[${this.index}] 查询签到状态失败: ${message}`);
273 if (/token|登录|授权|401/i.test(String(message))) this.removeCachedToken();
274 }
275 }
276
277 async doSign() {
278 if (this.isTodaySign) {

Callers 1

runMethod · 0.95

Calls 4

requestMethod · 0.95
removeCachedTokenMethod · 0.95
formatDateFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected