Go to file
hailin b4c4239593 feat: 实现手机号+密码登录和账号恢复功能
## 后端更改

### 新增功能
- 添加手机号+密码登录 API (`POST /user/login-with-password`)
  - 新增 LoginWithPasswordDto 验证手机号格式和密码长度
  - 实现 loginWithPassword 服务方法,使用 bcrypt 验证密码
  - 返回 JWT tokens(accessToken + refreshToken)

### 代码优化
- 修复 phone.validator.ts 中的 TypeScript 类型错误(Object -> object)

## 前端更改

### 新增功能
- 实现手机号+密码登录页面 (phone_login_page.dart)
  - 完整的表单验证(手机号格式、密码长度)
  - 集成 AccountService.loginWithPassword API
  - 登录成功后自动更新认证状态并跳转主页

### 账号服务优化
- 在 AccountService 中添加 loginWithPassword 方法
  - 调用后端 login-with-password API
  - 自动保存认证数据(tokens、用户信息)
  - 使用 _savePhoneAuthData 统一保存逻辑

### UI 文案更新
- 向导页文案修改:"创建账号" → "注册账号"
  - 更新标题、副标题和按钮文本
  - 添加"恢复账号"按钮,跳转到手机号密码登录页

## 已验证功能

 前端代码编译通过(0 errors, 仅有非关键警告)
 后端代码编译通过(0 errors, 仅有非关键警告)
 30天登录状态保持(JWT refresh token 已配置为30天)
 自动路由逻辑(有登录状态直接进入主页)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 20:35:44 -08:00
.claude feat(identity-service): 添加钱包生成自动重试机制 2025-12-20 19:20:55 -08:00
backend feat: 实现手机号+密码登录和账号恢复功能 2025-12-20 20:35:44 -08:00
docs docs: add planting architecture optimization documentation 2025-12-09 02:36:51 -08:00
frontend feat: 实现手机号+密码登录和账号恢复功能 2025-12-20 20:35:44 -08:00
kubernetes . 2025-11-25 10:29:24 +08:00
scripts . 2025-11-25 10:29:24 +08:00
tests . 2025-11-25 10:29:24 +08:00
.gitignore chore: add .claude to gitignore 2025-12-09 18:37:23 -08:00
README.md first commit 2025-11-23 21:21:44 -08:00
docker-compose.yml first commit 2025-11-23 21:21:44 -08:00

README.md