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
a6ebd3af87
feat(admin): 添加顶部导航栏和退出登入按钮
2026-03-25 16:34:02 +08:00
TianyangZhang
1ec8734401
fix(admin): 修复简历附件下载问题,完善简历信息展示
2026-03-25 16:32:33 +08:00
TianyangZhang
fbcd98dc46
fix: 投递后禁用重复点击,显示已投递提示
...
改动:
- 页面加载时检查用户是否已投递该职位
- 已投递的职位禁用投递按钮
- 按钮显示'已投递'而非'立即投递'
- 用户重复点击时显示警告提示'您已投递过该职位'
- 样式:禁用按钮改为灰色,cursor 改为 not-allowed
效果:
- 防止用户误操作或恶意重复投递
- 清晰提示用户已投递状态
- 即使刷新页面也能显示正确的投递状态
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 16:19:19 +08:00
TianyangZhang
911e872a4a
feat: 前端认证系统重构 - 密码注册和多种登入方式
...
前端改动:
RegisterView.vue:
- 改为传统密码注册(邮箱+用户名+手机号+密码)
- 移除邮箱验证码逻辑
- 注册成功后自动登入并跳转到首页
LoginView.vue:
- 求职者和管理员两个角色选项卡
- 求职者支持两种登入方式:
* 邮箱/用户名 + 密码
* 邮箱 + 验证码(快速登入)
- 登入方式通过子选项卡切换
- 添加"忘记密码"链接指向密码重置页面
- 管理员仍使用用户名+密码登入
ResetPasswordView.vue (新建):
- 两步流程:
1. 输入邮箱 → 获取验证码 → 输入验证码
2. 输入新密码 → 确认密码 → 重置完成
- 验证码倒计时和重新获取
- 密码重置成功后跳转到登入页
API更新 (auth.js):
- 修改 register() 使用 axios 而非 client
- 新增 resetPassword() - 请求密码重置
- 新增 confirmResetPassword() - 确认密码重置
路由更新 (router/index.js):
- 新增 /forgot-password 路由
设计特点:
- 统一的多种登入方式UI
- 清晰的密码重置流程
- 保留邮箱验证码快速登入选项
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 16:15:58 +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
1029bf812d
style(PortalLayout): 将标题和页脚从红色改为黑金主题色
...
- 顶部公告条背景改为黑色
- 主导航背景改为黑色渐变
- 底线装饰改为金色渐变
- 页脚背景改为黑色,边框改为金色
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:18:40 +08:00
TianyangZhang
cbb0c2f268
fix: 改进企业选择时的职位列表加载
...
- 改进错误处理,添加更详细的日志
- 简化 selectOrg 函数逻辑
- 确保职位列表在企业选择后正确加载显示
2026-03-25 15:15:33 +08:00
TianyangZhang
640cc68cfd
style: 增加左栏宽度以容纳长公司名称
...
将企业列表左栏宽度从 228px 增加到 320px,确保长公司名称能够正确显示。
2026-03-25 15:14:17 +08:00
TianyangZhang
b4a101d4fe
Merge remote changes, keeping two-panel layout
2026-03-25 15:12:55 +08:00
TianyangZhang
20f6b188e3
refactor: 简化首页为两栏布局(企业列表 + 职位列表)
...
移除右侧详情面板,只保留企业选择和职位列表展示:
- 左栏:全部企业(父公司和子公司树形展示)
- 右栏:所选企业的职位列表
- 点击职位链接到详情页面
简化了代码结构,移除了 selectJob、handleApply、handleCollect 等不需要的逻辑。
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:12:38 +08:00
TianyangZhang
bfc0ee4233
style: 移除所有红色强调,改用白色和灰色
...
将网站的所有红色强调改为中性的白色和灰色调:
- 按钮颜色:#E57373 -> #FFFFFF
- 悬停效果:#E86C6C -> #F0F0F0
- 用户头像:#B5272C -> #D4D4D4
- 阴影效果:改用灰色调
- 所有红色强调都更新为中性颜色
实现更加简洁清爽的设计风格,去除强烈的视觉冲击。
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:03:47 +08:00
TianyangZhang
82b796e211
style: 应用现代简约配色方案到三栏布局
...
将HomeView.vue的三栏布局更新为现代简约风格:
- 左栏:#F5F5F5 浅灰背景 + #333 深灰文字
- 中栏:#FFFFFF 纯白背景
- 右栏:#FFFFFF 纯白背景
- 选中态:#E57373 浅红强调
- 边框:#EFEFEF 浅灰
- 悬停效果:#EBEBEB 浅灰
提升视觉层次和可读性,符合现代UI设计规范。
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 15:01:12 +08:00
TianyangZhang
2b818f1ce7
style: 更新网站整体样式为黑金高端主题
...
将PortalLayout.vue和HomeView.vue的配色方案更新为高端黑金风格:
- 深黑背景:#1A1A1A (导航、页脚、banner)
- 黑色渐变:#2A2A2A -> #1A1A1A (深沉、高级感)
- 金色强调:#B8860B (按钮、装饰、链接)
- 浅金色:#D4AF37 (次要强调)
- 页面背景:#FAFAFA (纯白接近,简洁)
- 深灰文字:#3A3A3A (易读)
- 边框色:#D3D3D3 (细致)
配色定位:高端、专业、大气,适合央企形象
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 14:50:25 +08:00
TianyangZhang
5e3d521096
style: 更新网站整体样式为浅红色主题
...
将PortalLayout.vue和HomeView.vue的配色方案从深蓝央企风格更新为浅红色主题:
- 顶部条/页脚:#8B4545 (深玫瑰棕)
- 主导航渐变:#C17A7A -> #A85555 (柔和玫瑰色)
- 页面背景:#FBF5F5 (极浅粉)
- 主要按钮/图标:#E57373 (浅红色)
- 次要强调:#EF9A9A (更浅粉红)
- 辅助色:#D4A95D (暖金色)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 14:46:57 +08:00
TianyangZhang
ed3b29aafe
chore: 代码格式化和依赖更新
...
- 设计规范文档格式化
- 求职者布局样式微调
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:13:17 +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
e3bdb0b496
feat(admin): 岗位发布支持超级管理员选择企业
...
- 超级管理员发布职位时,表单新增「所属公司」下拉选择器
- 支持集团 + 子公司层级选择(子公司用 '└' 缩进显示)
- 职位列表新增「所属公司」列,方便区分各企业岗位
- 保存前验证:超级管理员未选公司时提示「请选择所属公司」
- 普通管理员(admin)看不到选择器,后端自动绑定其公司
- 编辑职位时自动回填公司选择
- 优化错误提示:保存失败时显示后端返回的具体错误信息
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:13:03 +08:00
TianyangZhang
7e86ec5ea0
feat(frontend): 首页三栏布局完全重设计,新增企业选择器和岗位联动
...
- 重构首页为三栏联动布局(企业 + 岗位 + 详情)
- 左栏:深蓝背景企业列表,支持集团和子公司分层显示
- 选中企业时显示金色左边框 + 背景色变化
- 每个企业/子公司显示实时在招岗位数
- 子公司采用缩进 + 树形连线视觉
- 中栏:选中企业的岗位列表
- 岗位卡片显示位置/薪资/类别标签
- 朱红左边框高亮选中岗位
- 右栏:岗位详情内容(完整复制 JobDetailView)
- Banner:深蓝红色渐变背景,显示岗位名/薪资/企业
- 操作:收藏 + 投递按钮,权限校验
- 详情:信息网格 + 职位介绍 + 工作地点 + 企业卡片
- 完整的投递流程和状态反馈
- 配色系统:
- 深蓝 #0E1E3D(左栏背景)
- 朱红 #B5272C(选中、强调)
- 金色 #C8973A(accent)
- 米色 #FAF7F3(右侧背景)
- 完整的加载/错误/空状态处理
- 骨架屏动画和交互反馈
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:12:57 +08:00
TianyangZhang
88c0bb223c
feat(frontend): 门户导航重设计,采用央企视觉体系
...
- 导航栏采用深蓝底色 + 金色点缀,体现央企庄重感
- 新增顶部公告条,快速链接登录/注册
- Logo 采用金色圆圈徽章 + 公司名设计
- 导航链接动画效果(下划线滑出)
- 新增用户信息展示区(头像 + 用户名)
- 页脚带红色分割线,强化视觉层级
- 配色:深蓝 #0E1E3D + 朱红 #B5272C + 金色 #C8973A
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 13:12:49 +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
f56e562a78
docs: add company jobs three-panel layout design spec
2026-03-25 11:04:03 +08:00
TianyangZhang
46e35074ed
feat: complete recruitment website MVP
...
All backend tests pass (17/17), frontend builds successfully, and superadmin account created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:43:50 +08:00
TianyangZhang
ef4c9bf307
feat: add admin management views (jobs, applications, organizations, users)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:42:51 +08:00
TianyangZhang
ca629a403c
feat: add seeker center (resume editor, applications, profile)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:42:46 +08:00
TianyangZhang
0a44e4a18d
feat: add login and register views with role-based redirect
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:42:42 +08:00
TianyangZhang
564fb06e3b
feat: add public portal pages (home, job list, job detail, companies)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:42:37 +08:00
TianyangZhang
734c83b7fe
feat: initialize Vue3 frontend with router, pinia, element-plus
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:37:09 +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
TianyangZhang
4cee7e9569
chore: add pytest configuration for Django tests
2026-03-24 17:06:18 +08:00
TianyangZhang
b19c29e24f
fix: correct settings module references and code quality issues
...
- Fix asgi.py and wsgi.py to point to config.settings.development
- Move timedelta import to top of base.py (PEP 8)
- Add STATIC_ROOT to base.py
- Add Redis OPTIONS with timeout config
- Add dev-only comments for ALLOWED_HOSTS and CORS_ALLOW_ALL_ORIGINS
2026-03-24 17:05:36 +08:00
TianyangZhang
82da70de0d
fix: set default DJANGO_SETTINGS_MODULE to development
2026-03-24 17:03:11 +08:00
TianyangZhang
f34b1cb000
feat: initialize Django backend project structure
...
Sets up Django 4.2 project skeleton with split settings (base/development),
JWT auth via simplejwt, DRF, CORS, PostgreSQL, Redis cache config, and
.gitignore. Apps (accounts, organizations, jobs, resumes, applications)
to be created in subsequent tasks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:01:28 +08:00
TianyangZhang
a5959f9a5b
docs: add recruitment website implementation plan
2026-03-24 16:50:58 +08:00
TianyangZhang
06878975b7
docs: add recruitment website design spec
2026-03-24 16:32:40 +08:00