Commit ab885f72 by 张立顺

新增环境配置

1 parent 8abdf513
......@@ -3,6 +3,12 @@
* 统一管理
*/
// 配置预发布的小程序aapId
export const preReleaseAppId = 'wxdb25dd43c3e1fc03'
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
/**
* 环境指定
* 0本地
......@@ -10,8 +16,9 @@
* 2测试
* 3生产环境
* 4预发布
* 5cdptest
*/
let index = 2
let index = 5
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......@@ -23,19 +30,24 @@ const release = false
// 判断小程序环境
// develop:开发版 trial:体验版 release:正式版
if (systemInfo.platform != 'devtools') {
switch (envName) {
case 'develop':
break
case 'trial':
index = manual ? index : 2
break
case 'release':
index = release ? index : 3
break
default:
index = 3
break
if (accountInfo.miniProgram.appId == preReleaseAppId) {
index = 5
} else {
switch (envName) {
case 'develop':
break
case 'trial':
index = manual ? index : 2
break
case 'release':
index = release ? index : 3
break
default:
index = 3
break
}
}
}
export const env = envName
......@@ -50,11 +62,7 @@ const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
// 报价单图片地址
export const quotedImgUrl = createQuotedUrl[target[envIndex]]
// 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138'
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
// sentry Dsn 地址
export const dsnUrl = 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
......
{
"appid": "wx570d9331f9ace0bd",
"appid": "wxdb25dd43c3e1fc03",
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"compileType": "miniprogram",
"libVersion": "2.29.2",
......
......@@ -22,6 +22,10 @@ const secretKey_items = {
preRelease: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
cdptest:{
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
const scrmSecretKey_items = {
......@@ -44,15 +48,19 @@ const scrmSecretKey_items = {
preRelease: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
},
cdptest:{
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
const domain_items = {
ip: {
// dj: 'http://192.168.1.165:8292',
dj: 'http://192.168.1.170:8292', //叶立庆
// dj: 'http://192.168.1.170:8292', //叶立庆
// dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.203:8292',//周杭
dj: 'http://192.168.1.203:8292',//周杭
// dj: 'http://192.168.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292'
......@@ -73,10 +81,15 @@ const domain_items = {
preRelease: {
dj: 'https://dj.beta.glsx.com.cn',
scrm: 'https://scrm.beta.glsx.com.cn'
}
},
cdptest: {
dj: 'https://cdptest.glsx.com.cn',
scrm: 'https://cdptest.glsx.com.cn'
},
}
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease','cdptest']
module.exports = {
domain: domain_items[target[envIndex]],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!