Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
vue-cli3-template-master
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
84316831
authored
2020-08-14 12:13:36 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
80b25105
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
src/api/fetch-api.js
src/api/fetch-api.js
View file @
8431683
...
...
@@ -8,6 +8,7 @@ import router from '@/router'
import
{
getToken
,
setToken
,
removeToken
}
from
'@/utils/auth'
// axios的默认url
...
...
@@ -49,7 +50,7 @@ axios.interceptors.response.use(
if
(
response
.
data
.
code
===
200
)
{
return
Promise
.
resolve
(
response
);
}
else
{
if
(
typeof
(
opt
.
toast
)
==
"undefined"
||
opt
.
toast
)
{
if
(
typeof
(
opt
)
==
"undefined"
||
typeof
(
opt
.
toast
)
==
"undefined"
||
opt
.
toast
)
{
Toast
(
response
.
data
.
errMsg
);
}
switch
(
response
.
data
.
code
)
{
...
...
Please
register
or
sign in
to post a comment