From 02678dabad78baa4a1b5745cdc5cdc907f219c02 Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Tue, 09 Nov 2021 13:58:33 +0800 Subject: [PATCH] 删除代理请求模式 --- bases/Fetcher.js | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index dd90242..d934518 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -82,12 +82,8 @@ } // 正常模式 else { - // 代理模式 - if (typeof project.host.proxyType !== 'undefined' && project.host.proxyType !== 'lc') { - url = '/proxy' + this._data.urlPrefix[1] + (serSuffix || devSuffix); - } // 开发环境地址 - else if (Fetcher.inDevMod) { + if (Fetcher.inDevMod) { url = this._data.urlPrefix[0] + devSuffix; } // 生产环境地址 @@ -110,7 +106,7 @@ * @param {object} [options] * @return {Promise<any>} */ - get(url, data, options = null) { + get(url, data, options = {}) { const params = Qs.stringify(data); if (url.indexOf('?') >= 0) { url += '&' + params; @@ -127,7 +123,7 @@ * @param {object} [options] * @return {Promise<any>} */ - post(url, data, options = null) { + post(url, data, options = {}) { if (this._data.mock === 'on') { return this.get(url, data, options); } -- Gitblit v1.9.1