提交 542f684e authored 作者: 王鹏飞's avatar 王鹏飞

update

上级 65907d03
......@@ -2,7 +2,7 @@ import httpRequest from '@/utils/axios'
// 登出
export function logout() {
return httpRequest.get('/api/lms/user/logout')
return httpRequest.get('/api/passport/logout')
}
// 获取用户信息
export function getUser() {
......
......@@ -49,11 +49,11 @@ export default {
},
data() {
return {
activeLink: '/course/learn',
activeLink: '/calendar',
menus: [
{ title: '直播日历', path: '' },
{ title: '系统管理', path: '' },
{ title: '个人设置', path: '' }
{ title: '直播日历', path: '/calendar' },
{ title: '系统管理', path: '/system' },
{ title: '个人设置', path: '/my' }
]
}
},
......@@ -81,7 +81,7 @@ export default {
// 退出登录
logout() {
this.$store.dispatch('logout').then(() => {
window.location.href = webConf.others.loginUrl
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
})
},
handleClick(path, item) {
......
<template>
<div class="app-header">
<div class="title">
<div class="logo"><img src="https://zws-imgs-pub.ezijing.com/pc/base/logo.svg" height="40" /></div>
<!-- <div class="title">
<router-link to="/">{{ title }}</router-link>
</div>
</div> -->
<div class="tool">
<!-- <nav class="nav">
<router-link to="/">首页</router-link>
......@@ -12,8 +13,8 @@
<div class="user">
<img :src="avatar" class="user-avatar" />
<span class="user-name" v-if="user.realname || user.nickname">{{ user.realname || user.nickname }}</span>
<span class="user-name" @click="logout">退出登录</span>
</div>
<div class="logout" @click="logout">退出登录</div>
</div>
</div>
</template>
......@@ -39,7 +40,7 @@ export default {
// 退出登录
logout() {
this.$store.dispatch('logout').then(() => {
window.location.href = webConf.others.loginUrl
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
})
}
}
......@@ -51,16 +52,19 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
height: 80px;
padding: 0 30px;
height: 60px;
padding: 0 20px;
background-color: #fff;
.tool {
display: flex;
align-items: center;
}
.logo {
height: 40px;
}
.title {
flex: 1;
font-size: 24px;
font-weight: 600;
color: #222;
......@@ -92,5 +96,8 @@ export default {
.user-name {
padding: 0 10px;
}
.logout {
cursor: pointer;
}
}
</style>
<template>
<app-container title="直播日历"></app-container>
</template>
<script>
import AppContainer from '@/components/AppContainer'
export default {
components: { AppContainer }
}
</script>
<template>
<app-container title="系统管理"></app-container>
</template>
<script>
import AppContainer from '@/components/AppContainer'
export default {
components: { AppContainer }
}
</script>
......@@ -7,7 +7,9 @@ export default [
component: Layout,
children: [
/* 首页 */
{ path: '/index', component: () => import(/* webpackChunkName: "home" */ '@/pages/home') }
{ path: '/index', component: () => import(/* webpackChunkName: "home" */ '@/pages/home') },
{ path: '/calendar', component: () => import(/* webpackChunkName: "calendar" */ '@/pages/calendar') },
{ path: '/system', component: () => import(/* webpackChunkName: "system" */ '@/pages/system') }
]
}
]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论