Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
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
fengzhaoyu
mingPayPc
Commits
e0438335
Commit
e0438335
authored
Dec 07, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setSpinning
parent
3d68bb63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
axios.js
src/api/axios.js
+2
-6
No files found.
src/api/axios.js
View file @
e0438335
...
...
@@ -28,17 +28,13 @@ axios.interceptors.request.use((config) => {
})
// 配置请求返回的拦截器,
axios
.
interceptors
.
response
.
use
(
res
=>
{
// if (res.data.resultCode === 0) {
// return Promise.resolve(res)
// } else {
// return Promise.reject()
// }
if
(
res
.
data
.
code
===
0
||
res
.
data
.
resultCode
===
0
)
{
store
.
dispatch
(
'setSpinning'
,
false
)
return
Promise
.
resolve
(
res
)
}
else
if
(
res
.
data
.
code
===
40003
||
res
.
data
.
resultCode
===
40003
)
{
store
.
dispatch
(
'setSpinning'
,
false
)
message
.
error
(
'权限不足'
)
return
Promise
.
reject
(
'1'
)
return
Promise
.
reject
()
}
},
err
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
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