|
@@ -8,6 +8,42 @@ const wx_projectkey = 'tehqApp';
|
|
|
const wx_dev = '';
|
|
|
// 测试环境:/dev
|
|
|
// 生产环境:''
|
|
|
+// 开发环境,生产环境新方法--start
|
|
|
+// pointApp,tehqApp
|
|
|
+// '',/dev
|
|
|
+// wx8cdd28824dfcdf19,wx928648edf0df1882
|
|
|
+let test_env = {
|
|
|
+ wx_projectkey: '',
|
|
|
+ wx_dev: ''
|
|
|
+}
|
|
|
+if (system.uniPlatform == 'app') { //app
|
|
|
+ let app_env = process.env.NODE_ENV;
|
|
|
+ if (app_env == 'development') {
|
|
|
+ test_env = {
|
|
|
+ wx_projectkey: 'pointApp',
|
|
|
+ wx_dev: '/dev'
|
|
|
+ }
|
|
|
+ } else if (app_env == 'production') {
|
|
|
+ test_env = {
|
|
|
+ wx_projectkey: 'tehqApp',
|
|
|
+ wx_dev: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+} else if (system.uniPlatform == 'mp-weixin') { //weixin
|
|
|
+ let wx_env = uni.getAccountInfoSync();
|
|
|
+ if (wx_env.miniProgram.envVersion == 'release') {
|
|
|
+ test_env = {
|
|
|
+ wx_projectkey: 'tehqApp',
|
|
|
+ wx_dev: ''
|
|
|
+ }
|
|
|
+ } else if (wx_env.miniProgram.envVersion == 'develop' || wx_env.miniProgram.envVersion == 'trial') {
|
|
|
+ test_env = {
|
|
|
+ wx_projectkey: 'pointApp',
|
|
|
+ wx_dev: '/dev'
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+// 开发环境,生产环境新方法--end
|
|
|
export default {
|
|
|
serverUrl: 'https://broadcast.waityou24.cn',
|
|
|
// serverUrl: 'http://192.168.223.1:12211',
|
|
@@ -16,6 +52,8 @@ export default {
|
|
|
system: system,
|
|
|
wx_projectkey: wx_projectkey,
|
|
|
wx_dev: wx_dev,
|
|
|
+ // 新变量
|
|
|
+ test_env: test_env,
|
|
|
share: {},
|
|
|
my_menu: [ //
|
|
|
{
|