TianyangZhang
54230b6cfd
fix(admin): 简化附件下载,直接使用Django媒体代理
2026-03-25 16:38:25 +08:00
TianyangZhang
79706dd840
fix(admin): 通过API端点下载简历附件,解决HTML问题
2026-03-25 16:35:43 +08:00
TianyangZhang
1ec8734401
fix(admin): 修复简历附件下载问题,完善简历信息展示
2026-03-25 16:32:33 +08:00
TianyangZhang
8a5ed86421
feat: 改为密码注册和多种密码登入方式,新增密码重置功能
...
后端改动:
- RegisterSerializer: 改为邮箱+用户名+手机号+密码注册
- CustomTokenObtainPairView: 支持三种登入方式
* 邮箱验证码登入(验证码有效10分钟,失败5次锁定)
* 邮箱+密码登入
* 用户名+密码登入
- 新增 PasswordLoginSerializer: 支持邮箱或用户名登入
- 新增 ResetPasswordSerializer: 请求密码重置
- 新增 ConfirmResetPasswordSerializer: 确认密码重置
- 新增 RequestResetPasswordView: 发送密码重置验证码
- 新增 ConfirmResetPasswordView: 重置密码
- 更新 URLs: 添加 /reset-password/ 和 /confirm-reset-password/
功能特性:
- 注册时需设置密码
- 登入可用邮箱或用户名 + 密码(邮箱和用户名对应同一密码)
- 保留邮箱验证码快速登入
- 忘记密码可通过邮箱验证码重置
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 16:14:57 +08:00
TianyangZhang
b6d5a51c3d
fix: 邮箱字段设置为唯一且必填,改善错误提示
...
后端改动:
- User.email 设置为 unique=True,确保每个邮箱只能注册一次
- 这样 SendCodeView 能正确查找到已注册的邮箱
前端改动:
- LoginView 增加详细的错误日志输出
- 捕获更多错误信息类型帮助调试
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 16:09:48 +08:00
TianyangZhang
12697c5750
feat: 登入页面支持求职者和管理员两种角色
...
前端改动:
- LoginView.vue 添加角色选择(求职者/管理员)
- 求职者使用邮箱验证码登入
- 管理员使用用户名密码登入
- 两种方式在同一页面,通过角色选项卡切换
后端改动:
- CustomTokenObtainPairView 改为支持两种登入方式
- 若提供 email+code 则使用邮箱验证码登入
- 若提供 username+password 则使用用户名密码登入
设计:
- 求职者可自助注册和邮箱验证码登入
- 管理员由 superadmin 创建,使用用户名密码登入
- 两种登入都返回同样的 JWT token
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:59:30 +08:00
TianyangZhang
99220b6daf
feat: 改为邮箱验证码注册,注册完成后自动登入
...
后端改动:
- RegisterSerializer 改为接收用户名+邮箱+手机号+验证码
- 验证邮箱是否已存在、用户名是否已存在
- 验证验证码有效性和正确性
- RegisterView 返回 JWT token,实现自动登入
前端改动:
- RegisterView.vue 改为邮箱验证码注册流程
- 保留用户名、邮箱、手机号字段
- 获取验证码后输入验证码完成注册
- 注册成功后自动保存 token 并跳转到首页
流程:用户名+邮箱+手机号 → 获取验证码 → 输入验证码 → 注册完成并自动登入 → 跳转首页
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:51:03 +08:00
TianyangZhang
72e7244ea0
feat: 将注册手机号改为必填项
2026-03-25 15:46:44 +08:00
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
TianyangZhang
536be6c1a1
refactor: 调整岗位、应用等模块,适配三栏设计
...
后端变更:
- 岗位序列化器调整,支持组织树形结构
- 应用序列化器更新
- 岗位视图逻辑兼容新的过滤需求
- 新增 JobFavorite 数据库迁移(岗位收藏功能)
- 岗位URL路由配置更新
前端变更:
- 岗位详情页面兼容新设计
- 求职者应用、简历页面样式调整
- 路由配置更新,支持三栏布局
- App.vue 组件调整
- Vite 配置微调
这些调整为首页三栏布局的完整实现提供支撑。
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:13:09 +08:00
TianyangZhang
11d1cec192
feat(backend): 组织序列化器添加在招岗位数统计
...
- JobListSerializer 和 JobDetailSerializer 新增 job_count 字段
- 统计 status='published' 的岗位数量
- 前端展示每个公司/子公司的在招岗位数
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:12:43 +08:00
TianyangZhang
619ca19f87
fix: prevent IDOR in application status update endpoint
...
Replace class-level queryset attribute with get_queryset() method that
scopes Application objects to the requesting admin's organization,
preventing regular admins from modifying applications belonging to
other organizations via pk enumeration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:31:31 +08:00
TianyangZhang
0ccd943255
feat: add Application model with status tracking and email notifications
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:46:14 +08:00
TianyangZhang
cc39c22e87
feat: add Resume model with JSONB fields and file upload
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:43:24 +08:00
TianyangZhang
f5d753d441
fix: fix jobs view filter backend and defensive queryset
...
- Replace inline __import__ with proper DjangoFilterBackend import
- Add SearchFilter to JobPublicViewSet filter_backends
- Add defensive check for missing organization_id in get_queryset
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:41:58 +08:00
TianyangZhang
f228ff0697
feat: add Job model with search/filter and role-based access
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:39:58 +08:00
TianyangZhang
cc2cd40532
fix: fix organizations view queryset and add API tests
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:37:54 +08:00
TianyangZhang
7e089bd5ec
feat: add Organization model with tree structure
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:34:56 +08:00
TianyangZhang
c3466f4866
feat: add custom User model with role-based permissions
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:11:40 +08:00