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

Method querySignHeader

wxapp/huazhu.js:171–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 async querySignHeader() {
172 const { status, data } = await request({
173 method: "GET",
174 url: `${SIGN_BASE}/game/sign_header`,
175 headers: signHeaders(this.sId),
176 });
177 if (status !== 200 || !ok(data)) throw new Error(`签到查询失败 HTTP ${status}: ${short(data)}`);
178
179 const info = data?.content || {};
180 this.log(
181 `签到信息: 今日${info.signToday ? "已签" : "未签"},签到积分: ${info.point ?? "-"},会员积分: ${
182 info.memberPoint ?? "-"
183 },年签到: ${info.yearSignInCount ?? "-"},下个奖励: ${info.nextAwardName || "-"}`
184 );
185 return info;
186 }
187
188 async sign() {
189 const before = await this.querySignHeader();

Callers 1

signMethod · 0.95

Calls 5

logMethod · 0.95
signHeadersFunction · 0.85
requestFunction · 0.70
okFunction · 0.70
shortFunction · 0.70

Tested by

no test coverage detected