Commit b25c20c8 by Sendya

add account/center router

updated workplace
parent 1f60f65b
......@@ -241,11 +241,24 @@ export const asyncRouterMap = [
]
},
{
path: '/settings',
component: () => import('../views/user/Index'),
name: 'settings',
hidden: true,
meta: { title: '用户设置', icon: 'profile' }
path: '/account',
component: Layout,
name: 'account',
meta: { title: '个人页', icon: 'user' },
children: [
{
path: 'center',
name: 'center',
component: () => import('@/views/user/Index'),
meta: { title: '个人中心' }
},
{
path: 'settings',
name: 'settings',
component: () => import('@/views/user/Index'),
meta: { title: '个人设置' }
}
]
},
{
......
......@@ -3,6 +3,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
nickname: state => state.user.name,
welcome: state => state.user.welcome,
roles: state => state.user.roles,
userInfo: state => state.user.info,
addRouters: state => state.permission.addRouters
......
<template>
<page-layout :avatar="avatar">
<div slot="headerContent">
<div class="title">{{ timeFix }}{{ user.name }}{{ welcome }}</div>
<div>打酱油工程师 | 白鹭学园-打酱油组事业群-VUE平台</div>
<div class="title">{{ timeFix }}{{ user.name }}{{ welcome() }}</div>
<div>前端工程师 | 蚂蚁金服 - 某某某事业群 - VUE平台</div>
</div>
<div slot="extra">
<a-row>
......@@ -99,7 +99,7 @@
</template>
<script>
import {timeFix, welcome} from "../../utils/util"
import { timeFix } from "@/utils/util"
import {mapGetters} from "vuex"
import PageLayout from '@/components/layout/PageLayout'
......@@ -118,7 +118,6 @@
data() {
return {
timeFix: timeFix(),
welcome: welcome(),
avatar: '',
user: {},
......@@ -183,7 +182,7 @@
this.initRadar()
},
methods: {
...mapGetters(["nickname"]),
...mapGetters(["nickname", "welcome"]),
getProjects() {
this.$http.get('/list/search/projects')
.then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment