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

Method trySignEndpoint

wxapp/ctrip.js:395–413  ·  view source on GitHub ↗
(pathname)

Source from the content-addressed store, hash-verified

393 }
394
395 async trySignEndpoint(pathname) {
396 const payloads = [
397 {},
398 { activityId: "wechat_signin_activity" },
399 { source: "wxapp", activityId: "wechat_signin_activity" },
400 ];
401 for (const payload of payloads) {
402 const res = await this.ctripRequest(pathname, payload);
403 const body = res.text.slice(0, 600);
404 if (res.status === 200 && (okResponseStatus(res.data) || /成功|已签到|sign/i.test(body))) {
405 $.log(`账号[${this.index}] 签到接口 ${pathname} 返回: ${body}`);
406 return true;
407 }
408 if (res.status !== 404 && res.status !== 403) {
409 $.log(`账号[${this.index}] 候选接口 ${pathname} [${res.status}]: ${body}`);
410 }
411 }
412 return false;
413 }
414
415 async sign() {
416 await this.querySignStatus();

Callers

nothing calls this directly

Calls 3

ctripRequestMethod · 0.95
okResponseStatusFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected