🐛 修复用户信息同步时机问题

前端修复:
- 在检测存储配置更新前,先同步完整的用户信息
- 确保 has_ftp_config 等字段及时更新
- 使用对象扩展运算符合并用户信息,避免覆盖现有字段

问题修复:
- 修复存储配置检测可能使用过期用户信息的问题
- 确保用户配置状态与服务器保持同步

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 21:07:08 +08:00
parent 1c8eded07e
commit 600545d652

View File

@@ -1775,6 +1775,8 @@ handleDragLeave(e) {
if (response.data.success && response.data.user) {
const user = response.data.user;
// 同步用户信息(含 has_ftp_config
this.user = { ...(this.user || {}), ...user };
// 检测存储配置是否被管理员更改
const oldStorageType = this.storageType;