Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
df85893d
Commit
df85893d
authored
Jan 04, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复退出后 用户头像没有清理的bug
parent
1eccab08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
index.ts
src/store/index.ts
+3
-0
AccountNum.vue
src/views/userCenter/AccountNum.vue
+8
-1
No files found.
src/store/index.ts
View file @
df85893d
...
...
@@ -51,6 +51,9 @@ export default new Vuex.Store({
save
(
state
:
any
,
payload
)
{
Object
.
assign
(
state
,
payload
);
},
clearAuthInfo
(
state
:
any
)
{
state
.
authInfo
=
{};
},
},
actions
:
{
getUserInfo
({
commit
})
{
...
...
src/views/userCenter/AccountNum.vue
View file @
df85893d
...
...
@@ -44,6 +44,7 @@ export default class AccountNum extends Vue {
@
Action
(
'getUserInfo'
)
private
getUserInfo
!
:
()
=>
void
;
@
Mutation
(
'updateIsLogin'
)
private
updateIsLogin
!
:
(
isLogin
:
boolean
)
=>
void
;
@
Mutation
(
'updateUserInfo'
)
private
updateUserInfo
!
:
(
userInfo
:
any
)
=>
void
;
@
Mutation
(
'clearAuthInfo'
)
private
clearAuthInfo
!
:
()
=>
void
;
@
Template
.
Mutation
(
"clearData"
)
private
clearTemplateData
!
:
()
=>
void
;
private
option
:
any
=
{
...
...
@@ -63,7 +64,13 @@ export default class AccountNum extends Vue {
private
logout
()
{
localStorage
.
removeItem
(
'userInfo'
);
this
.
updateIsLogin
(
false
);
this
.
updateUserInfo
({});
this
.
updateUserInfo
({
phone
:
''
,
icon
:
''
,
email
:
''
,
auth_type
:
0
,
});
this
.
clearAuthInfo
();
this
.
clearTemplateData
();
this
.
$router
.
replace
({
path
:
'/'
});
}
...
...
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