fix: 修复验证码session不一致的问题

问题原因:
- 验证码图片通过<img src>加载,可能不携带session cookie
- 导致验证码生成和表单提交使用不同的session

修复方案:
- 改用axios请求获取验证码(blob格式)
- 确保验证码请求携带withCredentials
- 点击"忘记密码"时立即加载验证码
- 切换到注册模式时立即加载验证码

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-28 13:50:06 +08:00
parent 540c292d70
commit 9d36063e09
2 changed files with 41 additions and 9 deletions

View File

@@ -1048,7 +1048,7 @@
</div>
</div>
<div style="text-align: right; margin-bottom: 15px;">
<a @click="showForgotPasswordModal = true" style="color: #667eea; cursor: pointer; font-size: 14px; text-decoration: none;">
<a @click="showForgotPasswordModal = true; refreshForgotPasswordCaptcha()" style="color: #667eea; cursor: pointer; font-size: 14px; text-decoration: none;">
忘记密码?
</a>
</div>