Commit Graph
9 Commits
Author SHA1 Message Date
smallfawnandClaude Opus 5 473006bca2 fix(jlyh): 请求失败不再抛 TypeError,改为明确的登录态失效提示(#276)
吉利银河:httpRequest 在请求出错/响应为空时 resolve() 返回 undefined,
调用方直接读 result.code 触发
  TypeError: Cannot read properties of undefined (reading 'code')
(refresh_token:205 / signstate:230 / sign / points 四处)。
这正是 issue 描述的「隔一段时间没打开APP就报错」——refreshToken 过期后
接口失败,脚本以崩溃收场而非给出可读原因。

改动:
- httpRequest 失败/空响应时返回 { __requestFailed: true } 而非 undefined
- 四处调用点改用可选链,并在 __requestFailed 时输出明确提示:
  「refreshToken 可能已过期,请先用手机打开一次「吉利银河」APP 刷新登录态后再跑」
- points 的积分字段也加了可选链兜底

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 11:50:28 +08:00
smallfawn 4a6417997f 1 2026-07-24 18:29:32 +08:00
smallfawn 2afb6a7666 fix some code 2026-04-12 16:09:01 +08:00
smallfawn 9860b50d46 del some code 2026-04-07 15:52:51 +08:00
smallfawn 4e50a97e36 add:hezj 2026-04-07 15:05:19 +08:00
smallfawn bd2055532b del some script 2026-04-06 17:03:02 +08:00
smallfawn 143c5a20a8 feat(new some script): new some script 2026-04-06 16:08:26 +08:00
smallfawn 8b2a3b37d2 Move scripts and refactor bjxd.py with AI support
Rename/move scripts (baitianGame.js -> backup/, chinaUnicom.py & bjxd.py -> daily/) and tidy README formatting. Major refactor of bjxd.py: add generic AI support (AI_API_KEY, AI_REQUEST_URL, AI_MODEL, AI_REQUEST_PARAMS) while keeping backward compatibility for HUNYUAN/GLM keys, load .env when available, improve HTTP requests (timeout, headers), use defensive .get() access for JSON fields, enhanced logging and error handling, add article browse exception handling and task flow/delay improvements, and minor behavior tweaks (device header, push notification on no users). Also add new Env declarations for scripts.
2026-04-02 10:22:19 +08:00
smallfawn 8ba25646bd Initial commit 2026-04-01 19:27:33 +08:00