feat: 优化登录功能 - 服务端认证 + Cookie + 新UI

主要改进:
1. 添加服务端认证中间件,未登录用户自动重定向到登录页
2. 使用 HTTPOnly Cookie 存储 token(比 localStorage 更安全)
3. 添加"记住我"功能(勾选:30天,不勾选:1天)
4. 添加登出 API (/api/auth/logout)
5. 登录/注册页面采用 Neumorphism 设计风格
   - 健康主题配色(青色 + 绿色)
   - Lora + Raleway 字体组合
   - 新拟态阴影效果
6. 支持登录后重定向到原页面

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 14:24:58 +08:00
parent 90116d5615
commit 518e5c8284
2 changed files with 622 additions and 164 deletions

File diff suppressed because it is too large Load Diff