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

Method querySignStatus

wxapp/ctrip.js:375–393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

373 }
374
375 async querySignStatus() {
376 const res = await this.ctripRequest("/restapi/soa2/13012/getSignTodayInfoProxy", {});
377 if (res.status === 401 && res.data?.code === "11001") {
378 $.log(`账号[${this.index}] 签到状态接口被携程运行态校验拦截: ${res.data.message}`);
379 return null;
380 }
381 if (res.status !== 200) {
382 $.log(`账号[${this.index}] 签到状态查询异常[${res.status}]: ${res.text.slice(0, 300)}`);
383 return null;
384 }
385 if (!okResponseStatus(res.data)) {
386 $.log(`账号[${this.index}] 签到状态查询失败: ${res.text.slice(0, 500)}`);
387 return null;
388 }
389 const info = parseJsonMaybe(res.data.responseJson || "{}");
390 const signed = !!(info && info.message === "成功" && info.sign === false);
391 $.log(`账号[${this.index}] 今日签到状态: ${signed ? "已签到" : "未签到/未知"}`);
392 return { signed, raw: info };
393 }
394
395 async trySignEndpoint(pathname) {
396 const payloads = [

Callers 1

signMethod · 0.95

Calls 4

ctripRequestMethod · 0.95
okResponseStatusFunction · 0.85
parseJsonMaybeFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected