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

update

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