feat(auth): 实现用户菜单及登出功能

- 在Header组件添加用户下拉菜单,支持显示用户名和操作选项
- 新增点击文档隐藏菜单的事件监听与清理
- 实现登出功能,调用后端登出接口,清理登录状态并跳转主页
- 路由新增管理员页面/admid及其组件admid.vue
- 删除unused的首页index.vue页面文件
- 后端新增登出接口/logout,支持用户会话注销
- 修正登录服务实现,修复密码匹配逻辑错误
- 客户端api新增logout接口调用后端登出功能
This commit is contained in:
lbw
2025-12-24 10:25:45 +08:00
parent 948144e7b2
commit 5404f295e4
7 changed files with 99 additions and 39 deletions

View File

@@ -4,6 +4,10 @@ export function login(data) {
return axios.post("/login/login", data)
}
export function logout() {
return axios.post("/login/logout")
}
export function getVerificationCode(data) {
return axios.post("/login/sendVerificationCode", data)
}