Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
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
徐俊
yn-science-front
Commits
bac0cea6
Commit
bac0cea6
authored
Jul 23, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
222
parent
3551c2a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
index.js
src/router/index.js
+1
-1
user.js
src/store/modules/user.js
+5
-4
No files found.
src/router/index.js
View file @
bac0cea6
...
...
@@ -317,7 +317,7 @@ export function changeSystemType (type) {
try
{
this
.
$store
.
commit
(
'app/clearStore'
)
setType
(
type
+
''
)
await
store
.
dispatch
(
'user/
logou
t'
)
await
store
.
dispatch
(
'user/
getMenuLis
t'
)
this
.
$store
.
commit
(
'app/setSystemType'
,
type
)
this
.
$router
.
push
(
'/'
)
resolve
(
true
)
...
...
src/store/modules/user.js
View file @
bac0cea6
...
...
@@ -51,13 +51,14 @@ const actions = {
})
},
logout
({
dispatch
})
{
_this
=
this
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
this
.
$message
.
error
(
'登录信息失效,请重新登录!'
)
this
.
$api
.
base
.
logout
().
then
(({
data
})
=>
{
}).
catch
(()
=>
{
})
_
this
.
$message
.
error
(
'登录信息失效,请重新登录!'
)
_
this
.
$api
.
base
.
logout
().
then
(({
data
})
=>
{
}).
catch
(()
=>
{
})
removeToken
()
window
.
sessionStorage
.
clear
()
this
.
$store
.
commit
(
'app/clearStore'
)
this
.
$router
.
push
(
`/login`
)
_
this
.
$store
.
commit
(
'app/clearStore'
)
_
this
.
$router
.
push
(
`/login`
)
})
},
}
...
...
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