Compare commits

...

2 Commits

@ -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/"',
}

@ -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

Loading…
Cancel
Save