From 424f9dbd9e481095e6225772503e77ab0916a384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Thu, 21 Feb 2019 14:22:43 +0800 Subject: [PATCH] fixed request.init --- src/request/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/request/index.js b/src/request/index.js index c353913..24fe915 100644 --- a/src/request/index.js +++ b/src/request/index.js @@ -84,13 +84,12 @@ class _Request { withCredentials: false // 跨域选项,是否验证凭证 } - Object.assign(param, this.__INIT__) // 取消网络请求 this.defer.promise.abort = () => { this.cancel = true this.xhr.abort() } - this.__next__(param) + this.__next__(Object.assign({}, this.__INIT__, param)) return this.defer.promise }