(pathname)
| 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(); |
nothing calls this directly
no test coverage detected