From 86468f858e9a5f56d27958976f049b0e1b006dd4 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 25 Aug 2021 10:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=A2=E6=B9=96=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/index.js | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) 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 */