feat: 前端对接 Profile/Messages/Settings 页面 API

- 3 消息页 + 2 资料编辑页 + 3 设置页 + 2 资料展示页
- api.ts 新增 Profile/Messages/ChangePassword 等类型和方法
- SSEContext 事件映射修复 + 断线重连修复
- 剩余页面加 USE_MOCK 双模式,52/55 页面已完成

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-02-10 10:27:59 +08:00
co-authored by Claude Opus 4.6
parent a76c302d7a
commit f02b3f4098
14 changed files with 473 additions and 41 deletions
+4
View File
@@ -83,6 +83,10 @@ export function SSEProvider({ children }: { children: ReactNode }) {
}
}
}
// 流正常结束(服务器关闭连接),5秒后重连
if (!controller.signal.aborted) {
reconnectTimerRef.current = setTimeout(connect, 5000)
}
} catch (err) {
if (err instanceof DOMException && err.name === 'AbortError') return
// 5秒后重连