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

Method getSignList

wxapp/parkson.js:225–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223 }
224
225 async getSignList() {
226 try {
227 const data = await this.request({
228 method: "GET",
229 apiPath: "/pointsSign/user/sign/list",
230 params: { v4Flag: true },
231 });
232 const today = formatDate();
233 const todayItem = Array.isArray(data) ? data.find((item) => item?.isToday || item?.dateStr === today) : null;
234 this.todayDate = todayItem?.dateStr || today;
235 this.isTodaySign = Number(todayItem?.daySignStatus) === 2;
236 $.log(`账号[${this.index}] 签到状态: ${this.todayDate} ${this.isTodaySign ? "已签" : "未签"}`);
237 } catch (e) {
238 $.log(`账号[${this.index}] 查询签到状态失败: ${e.message || e}`);
239 if (/token|登录|授权|401/i.test(String(e.message || e))) this.removeCachedToken();
240 }
241 }
242
243 async doSign() {
244 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