From 5b15175432d0d03d6a35c4555b26d38720095c3a Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Thu, 16 May 2024 17:39:29 +0800 Subject: [PATCH] 列表页筛选组件,修复下拉选择取消项和值为0的项,显示异常的问题 --- bases/Fetcher.js | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index 4fd1e10..5ee0a08 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -125,7 +125,7 @@ * @param {String} url * @param {*} [data] * @param {object} [options] - * @return {Promise<any>|} + * @return {Promise<any>} */ query(type, url, data = null, options = {}) { return new Promise((resolve, reject) => { @@ -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