From 1dd95fdfdab0f8c4c740e5e343159e92104298bd Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Sat, 08 Oct 2022 16:26:27 +0800 Subject: [PATCH] 上传图片支持携带参数 --- bases/Fetcher.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index 4fd1e10..5a3c494 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -150,8 +150,8 @@ // 捕获响应 options && options.onCapture && options.onCapture({ url: this._createUrlPrefix(options) + url, - request: JSON.stringify(data), - response: JSON.stringify(response.data), + request: data, + response: { ...response.data }, httpCode: response.statusCode, }); /** @@ -173,7 +173,7 @@ // 捕获响应 options && options.onCapture && options.onCapture({ url: this._createUrlPrefix(options) + url, - request: JSON.stringify(data), + request: data, httpCode: error && error.status, httpMsg: msg + (error.message ? (' / ' + error.message) : ''), }); -- Gitblit v1.9.1