mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2026-11-05 22:36:53 +08:00
fix(ydyp): 签到状态接口404不再中断整个流程(#288)
中国移动云盘:/market/signin/page/info 已被服务端下线(实测 404),而 getSigninStatus 用默认 throwHttpErrors,404 直接以 AxiosError 冒泡, 导致该账号后续签到与所有任务全部无法执行(issue 原话「导致无法继续自动签到」)。 改动: - getSigninStatus 加 throwHttpErrors:!1(与同文件 clickTask 一致的容错写法), 404 不再抛出中断 - 状态查询失效时不再直接 return,而是跳过状态判断继续调 doSignin, 并明确日志「状态接口已失效(服务端404,需重新抓包更新)」 实测端点存活情况:page/info 404、page/receive 404、hecheng1T/info 404; doSignin 用的 commonMarketconfig/getByMarketRuleName 200、task/taskList 200、 page/taskExpansion 200、receiveTaskExpansion 200 —— 故仅状态查询失效, 其余任务链路正常,修复后不再被一个死接口拖垮。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
473006bca2
commit
2d4c26fdc7
1 file changed
+9
-2
+9
-2
@@ -3791,10 +3791,13 @@ const $t = "https://caiyun.feixin.10086.cn/market/signin/page/info?client=app",
|
||||
function Ft(e) {
|
||||
return {
|
||||
getSigninStatus: async function() {
|
||||
// 该接口已被移动云盘下线(返回 404)。容错处理:不让 HTTP 错误抛出中断整个账号流程,
|
||||
// 否则 404 会以 AxiosError 冒泡,导致后续签到/任务全部无法执行(issue #288)。
|
||||
return e.requestJson({
|
||||
url: $t,
|
||||
method: "get",
|
||||
headers: e.jwtHeaders
|
||||
headers: e.jwtHeaders,
|
||||
throwHttpErrors: !1
|
||||
})
|
||||
},
|
||||
doSignin: async function() {
|
||||
@@ -4093,7 +4096,11 @@ class Ut {
|
||||
async signinStatus() {
|
||||
await this.sleep();
|
||||
const e = await this.api.getSigninStatus();
|
||||
if ("success" !== e?.msg) return void this.log(`签到状态查询失败: ${e?.msg||"未知错误"}`);
|
||||
if ("success" !== e?.msg) {
|
||||
this.log(`签到状态查询接口已失效(服务端 404,需重新抓包更新),跳过状态判断直接尝试签到`);
|
||||
const r = await this.api.doSignin();
|
||||
return void this.log("success" === r?.msg ? "签到完成(未经状态校验)" : `签到失败: ${r?.msg||"未知错误"}`)
|
||||
}
|
||||
if (e.result?.todaySignIn) return void this.log("今日已签到");
|
||||
const t = await this.api.doSignin();
|
||||
this.log("success" === t?.msg ? "签到成功" : `签到失败: ${t?.msg||"未知错误"}`)
|
||||
|
||||
Reference in new issue
Block a user