Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
b25c20c8
Commit
b25c20c8
authored
Sep 08, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add account/center router
updated workplace
parent
1f60f65b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
index.js
src/router/index.js
+18
-5
getters.js
src/store/getters.js
+1
-0
Workplace.vue
src/views/dashboard/Workplace.vue
+4
-5
No files found.
src/router/index.js
View file @
b25c20c8
...
...
@@ -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
:
'个人设置'
}
}
]
},
{
...
...
src/store/getters.js
View file @
b25c20c8
...
...
@@ -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
...
...
src/views/dashboard/Workplace.vue
View file @
b25c20c8
<
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
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment