fixed request.init
parent
81fd557d2c
commit
424f9dbd9e
|
@ -84,13 +84,12 @@ class _Request {
|
||||||
withCredentials: false // 跨域选项,是否验证凭证
|
withCredentials: false // 跨域选项,是否验证凭证
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(param, this.__INIT__)
|
|
||||||
// 取消网络请求
|
// 取消网络请求
|
||||||
this.defer.promise.abort = () => {
|
this.defer.promise.abort = () => {
|
||||||
this.cancel = true
|
this.cancel = true
|
||||||
this.xhr.abort()
|
this.xhr.abort()
|
||||||
}
|
}
|
||||||
this.__next__(param)
|
this.__next__(Object.assign({}, this.__INIT__, param))
|
||||||
return this.defer.promise
|
return this.defer.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue