From b381eaa0ef4eee2b36095b5c1b1f614eeeaab2f7 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Fri, 19 Aug 2022 11:39:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=BF=90=E8=A1=8C/?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/cl.js | 5 +++++ env/dev.js | 5 +++++ env/prod_xjzs.js | 5 +++++ env/self.js | 5 +++++ env/sh.js | 5 +++++ package.json | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ utils/domain.js | 11 ++++------ 7 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 env/cl.js create mode 100644 env/dev.js create mode 100644 env/prod_xjzs.js create mode 100644 env/self.js create mode 100644 env/sh.js create mode 100644 package.json diff --git a/env/cl.js b/env/cl.js new file mode 100644 index 0000000..31228e3 --- /dev/null +++ b/env/cl.js @@ -0,0 +1,5 @@ +const ENV_PATH = { + baseUrl: 'http://192.168.31.161:9999', // 长龙 +} + +module.exports = ENV_PATH \ No newline at end of file diff --git a/env/dev.js b/env/dev.js new file mode 100644 index 0000000..89fc05f --- /dev/null +++ b/env/dev.js @@ -0,0 +1,5 @@ +const ENV_PATH = { + baseUrl: 'http://81.70.55.170:9999', // 微信的测试环境 +} + +module.exports = ENV_PATH \ No newline at end of file diff --git a/env/prod_xjzs.js b/env/prod_xjzs.js new file mode 100644 index 0000000..8044ed6 --- /dev/null +++ b/env/prod_xjzs.js @@ -0,0 +1,5 @@ +const ENV_PATH = { + baseUrl: 'https://hxz.quhouse.com', // 销讲助手 +} + +module.exports = ENV_PATH \ No newline at end of file diff --git a/env/self.js b/env/self.js new file mode 100644 index 0000000..7bc05d9 --- /dev/null +++ b/env/self.js @@ -0,0 +1,5 @@ +const ENV_PATH = { + baseUrl: 'http://127.0.0.1:9999', // 本地 +} + +module.exports = ENV_PATH \ No newline at end of file diff --git a/env/sh.js b/env/sh.js new file mode 100644 index 0000000..5d41014 --- /dev/null +++ b/env/sh.js @@ -0,0 +1,5 @@ +const ENV_PATH = { + baseUrl: 'http://192.168.31.149:9999', // 胜浩 +} + +module.exports = ENV_PATH \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..f352095 --- /dev/null +++ b/package.json @@ -0,0 +1,56 @@ +{ + "uni-app": { + "scripts": { + "weixin:self": { + "title": "本地ip", + "env": { + "UNI_PLATFORM": "mp-weixin", + "ENV_PATH": "@/env/self.js" + }, + "define": { + "WXCS-PLATFORM": true + } + }, + "weixin:cl": { + "title": "长龙ip", + "env": { + "UNI_PLATFORM": "mp-weixin", + "ENV_PATH": "@/env/cl.js" + }, + "define": { + "WXCS-PLATFORM": true + } + }, + "weixin:sh": { + "title": "胜浩ip", + "env": { + "UNI_PLATFORM": "mp-weixin", + "ENV_PATH": "@/env/sh.js" + }, + "define": { + "WXCS-PLATFORM": true + } + }, + "weixin:test": { + "title": "测试服务器", + "env": { + "UNI_PLATFORM": "mp-weixin", + "ENV_PATH": "@/env/dev.js" + }, + "define": { + "WXCS-PLATFORM": true + } + }, + "weixin:ai": { + "title": "AI销讲助手 生产", + "env": { + "UNI_PLATFORM": "mp-weixin", + "ENV_PATH": "@/env/prod_xjzs.js" + }, + "define": { + "WXSC-PLATFORM": true + } + }, + } + } +} diff --git a/utils/domain.js b/utils/domain.js index 360fa5b..1746acb 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -1,10 +1,7 @@ -const base = 'http://81.70.55.170:9999'; // 测试站 -// const base = 'http://127.0.0.1:9999'; // 本地 -// const base = 'http://192.168.31.149:9999' ;// 胜浩 -// const base = 'http://192.168.31.161:9999' // 长龙 -// const base = 'https://zanyong.hfju.com';// 正式 AI销管// 弃用 -// const base = 'https://hxz.quhouse.com';// 正式 AI销讲助手 - +/** + * env文件里配置自定义运行菜单每一个js代表一个域名 + */ +const base = process.env.ENV_PATH == undefined ? require('../env/dev.js') : require(process.env.ENV_PATH) // http.js使用 const baseUrl = `${base}/autoSR/api`; // config 使用