This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

fixed request.init

old
宇天 2019-02-21 14:22:43 +08:00
parent 81fd557d2c
commit 424f9dbd9e
1 changed files with 1 additions and 2 deletions

View File

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