Merge pull request #1001 from iview/2.0

update
This commit is contained in:
Lison 2018-09-28 15:17:39 +08:00 committed by GitHub
commit b109f2c589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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)
})
}