diff --git a/common/js/api.js b/common/js/api.js index bb6a529..38048bb 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -1,9 +1,18 @@ // let baseUrl = 'http://192.168.66.219:8000' -let baseUrl = 'https://intp.xingtongworld.com' -// let baseUrl = 'http://ljclf.dgyq-water.com' +// let baseUrl = 'https://intp.xingtongworld.com' +// let baseUrl = 'http://ljclf.dgyq-water.com:8078' // let baseUrl = 'http://120.234.15.170:8078' // let baseUrl = 'http://invoice.com' +let baseUrl = '' + +if (process.env.NODE_ENV === 'development') { + // 开发环境:使用本地测试地址 + baseUrl = 'https://intp.xingtongworld.com' +} else { + // 生产环境(打包后):使用相对路径(同域) + baseUrl = '' +} let API = { baseUrl: baseUrl,