Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa73e169
authored
Nov 20, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登陆用户名
1 parent
c92c49ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
src/layout/header-aside/components/header-user/index.vue
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/user.js
src/layout/header-aside/components/header-user/index.vue
View file @
fa73e16
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<
/el-dropdown-menu
>
<
/el-dropdown-menu
>
<
/el-dropdown>--
>
<
/el-dropdown>--
>
<
div
v
-
popover
:
popover
-
personal
class
=
"d2-mr personal-wrap"
>
<
div
v
-
popover
:
popover
-
personal
class
=
"d2-mr personal-wrap"
>
<
span
v
-
if
=
"show"
class
=
"btn-text"
>
{{
info
&&
info
.
accountName
?
`${info.accountName
}
`
:
'未登录'
}}
<
d2
-
el
-
icon
name
=
"caret-bottom"
/><
/span
>
<
span
v
-
if
=
"show"
class
=
"btn-text"
>
{{
info
&&
info
.
userType
?
(
info
.
userType
==
1
?
`${info.detail.name
}
`
:
`${info.detail.merchantName
}
`
)
:
'未登录'
}}
<
d2
-
el
-
icon
name
=
"caret-bottom"
/><
/span
>
<
el
-
popover
ref
=
"popover-personal"
placement
=
"bottom-end"
trigger
=
"hover"
>
<
el
-
popover
ref
=
"popover-personal"
placement
=
"bottom-end"
trigger
=
"hover"
>
<
personal
-
panel
:
user
=
"info"
><
/personal-panel
>
<
personal
-
panel
:
user
=
"info"
><
/personal-panel
>
<
/el-popover
>
<
/el-popover
>
...
...
src/store/modules/d2admin/modules/account.js
View file @
fa73e16
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
})
})
getUserInfo
({}).
then
(
async
res
=>
{
getUserInfo
({}).
then
(
async
res
=>
{
// // 设置 vuex 用户信息
// // 设置 vuex 用户信息
await
dispatch
(
'd2admin/user/set'
,
res
.
detail
,
{
root
:
true
})
await
dispatch
(
'd2admin/user/set'
,
res
,
{
root
:
true
})
})
})
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
...
src/store/modules/d2admin/modules/user.js
View file @
fa73e16
...
@@ -15,7 +15,6 @@ export default {
...
@@ -15,7 +15,6 @@ export default {
set
({
state
,
dispatch
},
info
)
{
set
({
state
,
dispatch
},
info
)
{
return
new
Promise
(
async
resolve
=>
{
return
new
Promise
(
async
resolve
=>
{
// store 赋值
// store 赋值
// console.log(info)
state
.
info
=
info
state
.
info
=
info
sessionStorage
.
setItem
(
SESSION_NAME
,
escape
(
JSON
.
stringify
(
info
)))
sessionStorage
.
setItem
(
SESSION_NAME
,
escape
(
JSON
.
stringify
(
info
)))
resolve
()
resolve
()
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment