From ef7f8f7329fab93f7a398618c488277a4bf3272f Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Wed, 22 Mar 2023 09:52:20 +0800 Subject: [PATCH] 取消关闭mock功能,所有mock走get,图片上传可以单独改地址走post --- bases/Fetcher.js | 8 ++------ bases/HostBoot.js | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index c81008e..5a3c494 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -64,12 +64,8 @@ spellURL(devSuffix, serSuffix) { let url = ''; // mock地址 - if ($hostBoot.isDevMod()) { - if ($hostBoot.isOnMock()) { - url = this._data.urlPrefix[0].replace('api/', '') + devSuffix + '.json'; - } else { - url = this._data.urlPrefix[0] + devSuffix; - } + if ($hostBoot.isOnMock()) { + url = this._data.urlPrefix[0].replace('api/', '') + devSuffix + '.json'; } // 正常地址 else { diff --git a/bases/HostBoot.js b/bases/HostBoot.js index 83aefda..12f98bc 100644 --- a/bases/HostBoot.js +++ b/bases/HostBoot.js @@ -14,7 +14,6 @@ */ constructor() { this._data = { - mockOff: Tools.getUrlParam('mock') === 'off', // 可用主机列表 hostList: { ...project.host.hosts, @@ -194,9 +193,6 @@ */ isOnMock() { if (this.isDevMod()) { - if (this._data.mockOff) { - return false; - } return this.getHostName() === 'lc'; } else { return false; -- Gitblit v1.9.1