问题:登录失败时,401 错误会触发自动跳转到登录页, 导致错误提示来不及显示就被页面刷新覆盖。 解决方案:在 fetchWithAuth 函数中,只有当用户不在登录 页面时才执行 401 错误的自动跳转逻辑,让登录页面能够 正常显示错误提示信息。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
问题:登录失败时,401 错误会触发自动跳转到登录页, 导致错误提示来不及显示就被页面刷新覆盖。 解决方案:在 fetchWithAuth 函数中,只有当用户不在登录 页面时才执行 401 错误的自动跳转逻辑,让登录页面能够 正常显示错误提示信息。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>