Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
wanda-ball
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5df8bc0d
authored
May 23, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
e29766d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
src/modules/js/request.js
+10
-10
src/modules/store/index.js
+2
-2
No files found.
src/modules/js/request.js
View file @
5df8bc0d
...
...
@@ -44,11 +44,11 @@ axios.interceptors.response.use(
return
response
}
else
{
response
.
status
=
400
Toast
({
message
:
response
.
data
.
msg
,
position
:
'center'
,
duration
:
2
*
1000
})
//
Toast({
//
message: response.data.msg,
//
position: 'center',
//
duration: 2 * 1000
//
})
if
(
response
.
data
.
code
==
100100
||
response
.
data
.
code
==
100101
)
{
store
.
dispatch
(
'getAuth'
).
then
()
}
...
...
@@ -122,11 +122,11 @@ axios.interceptors.response.use(
break
}
}
Toast
({
message
:
err
.
message
,
position
:
'center'
,
duration
:
3
*
1000
})
//
Toast({
//
message: err.message,
//
position: 'center',
//
duration: 3 * 1000
//
})
// Toast.fail(err.message)
console
.
log
(
'❎❎'
,
err
.
message
)
...
...
src/modules/store/index.js
View file @
5df8bc0d
...
...
@@ -88,8 +88,8 @@ export default new Vuex.Store({
},
actions
:
{
getAuth
({
commit
,
state
})
{
if
(
!
state
.
isAuth
)
{
return
new
Promise
()
if
(
state
.
isAuth
)
{
return
}
window
.
localStorage
.
removeItem
(
'token'
)
window
.
localStorage
.
removeItem
(
'type'
)
...
...
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