Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
micro-portal
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 ecbd5e02
authored
Nov 11, 2020
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
ee71d31d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
src/components/DesktopTopSider/Sub/UserButton.vue
src/components/HomeContent/Sub/LoginForm.vue
src/components/DesktopTopSider/Sub/UserButton.vue
View file @
ecbd5e0
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<template
v-slot:content
>
<template
v-slot:content
>
<div
@
click=
"logout"
class=
"pop-over-item"
>
登出
</div>
<div
@
click=
"logout"
class=
"pop-over-item"
>
登出
</div>
</
template
>
</
template
>
<span
class=
"portal-user-name"
>
{{userName}}
</span>
<a-avatar
class=
"top-nav-right-btn avatar-btn"
:size=
"35"
>
<a-avatar
class=
"top-nav-right-btn avatar-btn"
:size=
"35"
>
<
template
v-slot:icon
>
<
template
v-slot:icon
>
<UserOutlined
/>
<UserOutlined
/>
...
@@ -29,6 +30,9 @@ export default {
...
@@ -29,6 +30,9 @@ export default {
setup
()
{
setup
()
{
const
store
=
useStore
();
const
store
=
useStore
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
state
=
reactive
({
userName
:
store
.
getters
.
userInfo
.
username
});
// 登出操作
// 登出操作
const
logout
=
()
=>
{
const
logout
=
()
=>
{
localStorage
.
removeItem
(
'token'
);
localStorage
.
removeItem
(
'token'
);
...
@@ -40,6 +44,7 @@ export default {
...
@@ -40,6 +44,7 @@ export default {
},
300
)
},
300
)
}
}
return
{
return
{
...
toRefs
(
state
),
logout
logout
}
}
}
}
...
@@ -56,6 +61,12 @@ export default {
...
@@ -56,6 +61,12 @@ export default {
}
}
}
}
.portal-user-name
{
vertical-align
:
middle
;
margin-right
:
10px
;
color
:
#666
;
}
.avatar-btn
{
.avatar-btn
{
opacity
:
.8
;
opacity
:
.8
;
background-color
:
@
defaultLightBlueColor
;
background-color
:
@
defaultLightBlueColor
;
...
...
src/components/HomeContent/Sub/LoginForm.vue
View file @
ecbd5e0
...
@@ -143,6 +143,7 @@ export default {
...
@@ -143,6 +143,7 @@ export default {
const
{
message
}
=
res
;
const
{
message
}
=
res
;
state
.
alertArr
.
push
(
message
);
state
.
alertArr
.
push
(
message
);
state
.
showAlert
=
true
;
state
.
showAlert
=
true
;
store
.
dispatch
(
'app/showLoading'
,
false
);
}
}
},
(
err
)
=>
{
},
(
err
)
=>
{
store
.
dispatch
(
'app/showLoading'
,
false
);
store
.
dispatch
(
'app/showLoading'
,
false
);
...
...
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