# 2026-06-14 工作记录 ## OTP双因素认证开发完成 ### 后端(已有) - `POST /agents/otp-bind` - 绑定OTP - `POST /agents/otp-verify` - 验证启用 - `POST /agents/otp-unbind` - 解绑OTP - `POST /agents/otp-verify` - 登录时二次验证(admin角色) - `POST /admin/agents/{id}/otp-unbind` - 管理员强制解绑 ### 坐席端前端 - `frontend-agent/src/api/agent.ts` - 新增 bindOtp/verifyOtp/unbindOtp API - `frontend-agent/src/components/layout/TopBar.vue` - 下拉菜单添加"OTP二次验证"选项 + 对话框(绑定/验证/解绑) ### 管理后台前端 - `frontend-admin/src/components/AgentTable.vue` - 新增OTP列(已启用/未验证/未绑定) - `frontend-admin/src/views/Agents.vue` - 编辑对话框添加OTP状态显示+强制解绑按钮 - `frontend-admin/src/api/admin.ts` - 新增 unbindOtp API ### 数据库修复 - messages/conversations/agents等表的id字段从UUID改为VARCHAR(36)