Recruitment_site/offer_backend/apps/accounts
TianyangZhang 2edc9beef3 feat: 实现邮箱验证码登入功能
后端改动:
- 新增 VerificationCode 模型,支持验证码有效期和重试限制
- 新增 SendCodeView 生成并发送邮箱验证码
- 自定义 TokenObtainPairView 支持邮箱+验证码登入
- 添加 SendCodeSerializer 和 LoginSerializer

前端改动:
- 改写 LoginView.vue 为单页面邮箱+验证码登入流程
- 修改 auth API,新增 sendCode() 和修改 loginApi()
- 更新 auth store 的 login 方法支持邮箱和验证码

功能特性:
- 验证码有效期 10 分钟
- 同一邮箱 5 次错误尝试后锁定 10 分钟
- 支持重新发送验证码
- 完全替换原有用户名密码登入方式

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:30:23 +08:00
..
migrations feat: 实现邮箱验证码登入功能 2026-03-25 15:30:23 +08:00
tests feat: add custom User model with role-based permissions 2026-03-24 17:11:40 +08:00
__init__.py feat: add custom User model with role-based permissions 2026-03-24 17:11:40 +08:00
apps.py feat: add custom User model with role-based permissions 2026-03-24 17:11:40 +08:00
models.py feat: 实现邮箱验证码登入功能 2026-03-25 15:30:23 +08:00
permissions.py feat: add custom User model with role-based permissions 2026-03-24 17:11:40 +08:00
serializers.py feat: 实现邮箱验证码登入功能 2026-03-25 15:30:23 +08:00
urls.py feat: 实现邮箱验证码登入功能 2026-03-25 15:30:23 +08:00
views.py feat: 实现邮箱验证码登入功能 2026-03-25 15:30:23 +08:00