update
This commit is contained in:
parent
222242dccc
commit
cda848588b
|
|
@ -14,7 +14,7 @@ class HttpRequest {
|
|||
}
|
||||
return config
|
||||
}
|
||||
distroy (url) {
|
||||
destroy (url) {
|
||||
delete this.queue[url]
|
||||
if (!Object.keys(this.queue).length) {
|
||||
// Spin.hide()
|
||||
|
|
@ -34,11 +34,11 @@ class HttpRequest {
|
|||
})
|
||||
// 响应拦截
|
||||
instance.interceptors.response.use(res => {
|
||||
this.distroy(url)
|
||||
this.destroy(url)
|
||||
const { data, status } = res
|
||||
return { data, status }
|
||||
}, error => {
|
||||
this.distroy(url)
|
||||
this.destroy(url)
|
||||
return Promise.reject(error)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue