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