feat(auth): 实现用户菜单及登出功能
- 在Header组件添加用户下拉菜单,支持显示用户名和操作选项 - 新增点击文档隐藏菜单的事件监听与清理 - 实现登出功能,调用后端登出接口,清理登录状态并跳转主页 - 路由新增管理员页面/admid及其组件admid.vue - 删除unused的首页index.vue页面文件 - 后端新增登出接口/logout,支持用户会话注销 - 修正登录服务实现,修复密码匹配逻辑错误 - 客户端api新增logout接口调用后端登出功能
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import Index from '@/pages/index.vue'
|
||||
import Uploadpng from '@/pages/uploadpng.vue'
|
||||
import LearningPlan from '@/pages/LearningPlan.vue'
|
||||
import Class from '@/pages/class.vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import Admid from '@/pages/admid/admid.vue'
|
||||
import Student from '@/pages/student.vue'
|
||||
|
||||
// 统一在这里声明所有路由
|
||||
@@ -34,6 +34,13 @@ const routes = [
|
||||
meta: { // meta 信息
|
||||
title: '学生详情' // 页面标题
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/admid', // 路由地址
|
||||
component: Admid, // 对应组件
|
||||
meta: { // meta 信息
|
||||
title: '管理员页面' // 页面标题
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user