问题原因: ApiClient使用内存缓存的token,登录后虽然保存到SharedPreferences, 但ApiClient的内存缓存未更新,导致后续请求仍使用旧token或无token。 解决方案: 移除内存缓存,每次请求都从SharedPreferences读取最新token, 确保登录后立即生效。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api_client.dart | ||
| api_endpoints.dart | ||
| interceptors.dart | ||