From cb52edbdf8e04e8ab9a89bc1393a9e16853c78fe Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 28 Apr 2023 11:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/prod.env.js | 2 +- src/utils/request.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/prod.env.js b/config/prod.env.js index dfc063a..1962935 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://company6.dxbs.vip/index.php/"', + BASE_API: '"http://web.lbschem.com:8088/index.php/"', } diff --git a/src/utils/request.js b/src/utils/request.js index c11ca3f..8b433a2 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -49,11 +49,11 @@ if (window.location.href.indexOf('index.html') != -1) { } else { hrefs = window.location.href.split('#') } -const baseURL = hrefs.length > 0 ? hrefs[0] : window.location.href +// const baseURL = hrefs.length > 0 ? hrefs[0] : window.location.href // baseURL + 'index.php/' 默认请求地址 // process.env.BASE_API 自定义请求地址 -window.BASE_URL = process.env.NODE_ENV === 'production' ? baseURL + 'index.php/' : process.env.BASE_API +window.BASE_URL = process.env.BASE_API const service = axios.create({ baseURL: window.BASE_URL, // api 的 base_url