Commit abd60335 by 张立顺

修改环境取值位置

1 parent 4e8eda3e
......@@ -4,14 +4,19 @@
*/
// 配置预发布的小程序aapId
export const preReleaseAppId = 'wx24ebae5768e74138'
// export const preReleaseAppId = 'wx24ebae5768e74138'
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
// 开发环境
// 开发指定的小程序
/**
* 环境指定
* 0本地
* 1开发
* 2测试
* 3生产环境
*/
export const env = 1
// sentry Dsn 地址
export const dsnUrl = 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
/**
*
0本地
1开发
2测试
3生产环境
*/
import { env } from '~/config'
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2
const manual = false
const release = false
let index = 2
const index = env
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
......@@ -25,7 +19,6 @@ let index = 2
if (systemInfo.platform != 'devtools') {
switch (accountInfo.miniProgram.envVersion) {
case 'develop':
// this.globalData.url = 'http://192.168.0.252:3000/api'; //
break
case 'trial':
index = manual ? index : 2
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!