Commit 87b5d8ff by fengzhaoyu

axios返回拦截

parent dbc2529d
...@@ -32,9 +32,9 @@ axios.interceptors.response.use(res => { ...@@ -32,9 +32,9 @@ axios.interceptors.response.use(res => {
// } else { // } else {
// return Promise.reject() // return Promise.reject()
// } // }
if (res.code === 0 || res.data.resultCode === 0) { if (res.data.code === 0 || res.data.resultCode === 0) {
return Promise.resolve(res) return Promise.resolve(res)
}else if(res.data.resultCode === 4003) { }else if(res.data.code === 40003 || res.data.resultCode === 40003) {
message.error('权限不足') message.error('权限不足')
return Promise.reject() return Promise.reject()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment