fix: shiro 缓存失效时自动重新登录获取充值记录

- /api/history 充值记录获取失败时触发 fullLoginFlow 重建会话

- 重建后重试一次, 彻底失败才降级为无充值计算

- 补充 fullLoginFlow 失败日志便于排查

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-08-23 21:48:41 +08:00
parent f2cb2e796d
commit 36985771d5
2 changed files with 43 additions and 11 deletions

View File

@@ -404,6 +404,7 @@ func queryElectric() *electricResult {
// 2. 完整登录
appShiro, room, result, err := fullLoginFlow()
if err != nil {
fmt.Println("[登录] fullLoginFlow 失败:", err)
clearCache()
return &electricResult{OK: false, Error: err.Error()}
}