diff --git a/src/config/index.js b/src/config/index.js index a55f95a..17ecc00 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,13 +1,42 @@ const isHh = location.host.includes('10.196.131.73') //是否是河海版本 +const isCH = location.host.includes('120.78.127.12') //是否是巢湖版本 +const isBeta = process.env.NODE_ENV === 'development' || location.host.includes('120.78.198.231') //是否是职站测试 +const isPro = location.host.includes('occupationlab.com') //是否是职站生产 + +let host = ""; +if(isHh) { + host = "http://10.196.131.73/"; +} else if(isCH) { + host = "http://120.78.127.12/"; +} else if(isBeta) { + host = "http://120.78.198.231:8081/"; +} else if(isPro) { + host = "http://www.occupationlab.com/"; +} else { + console.log("其它版本"); +} + export default { /** - * @description 域名切换,120.78.198.231:职站测试环境,occupationlab.com:职站正式环境,10.196.131.73:河海版本 + * @description 域名切换 */ - host: (process.env.NODE_ENV === 'development' || location.host.includes('120.78.198.231')) ? 'http://120.78.198.231:8081/' : (location.host.includes('10.196.131.73') ? 'http://10.196.131.73/' : 'http://www.occupationlab.com/'), + host, /** * @description 是否是河海版本 */ isHh, + /** + * @description 是否是巢湖版本 + */ + isCH, + /** + * @description 是否是开发/测试版本 + */ + isBeta, + /** + * @description 是否是生产版本 + */ + isPro, /** * @description 配置显示在浏览器标签的title */