Commit ab885f72 by 张立顺

新增环境配置

1 parent 8abdf513
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
* 统一管理 * 统一管理
*/ */
// 配置预发布的小程序aapId
export const preReleaseAppId = 'wxdb25dd43c3e1fc03'
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
/** /**
* 环境指定 * 环境指定
* 0本地 * 0本地
...@@ -10,8 +16,9 @@ ...@@ -10,8 +16,9 @@
* 2测试 * 2测试
* 3生产环境 * 3生产环境
* 4预发布 * 4预发布
* 5cdptest
*/ */
let index = 2 let index = 5
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
...@@ -23,6 +30,9 @@ const release = false ...@@ -23,6 +30,9 @@ const release = false
// 判断小程序环境 // 判断小程序环境
// develop:开发版 trial:体验版 release:正式版 // develop:开发版 trial:体验版 release:正式版
if (systemInfo.platform != 'devtools') { if (systemInfo.platform != 'devtools') {
if (accountInfo.miniProgram.appId == preReleaseAppId) {
index = 5
} else {
switch (envName) { switch (envName) {
case 'develop': case 'develop':
break break
...@@ -36,6 +46,8 @@ if (systemInfo.platform != 'devtools') { ...@@ -36,6 +46,8 @@ if (systemInfo.platform != 'devtools') {
index = 3 index = 3
break break
} }
}
} }
export const env = envName export const env = envName
...@@ -50,11 +62,7 @@ const target = ['ip', 'develop', 'trial', 'release', 'preRelease'] ...@@ -50,11 +62,7 @@ const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
// 报价单图片地址 // 报价单图片地址
export const quotedImgUrl = createQuotedUrl[target[envIndex]] export const quotedImgUrl = createQuotedUrl[target[envIndex]]
// 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138'
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
// sentry Dsn 地址 // sentry Dsn 地址
export const dsnUrl = 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23' 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", "projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.29.2", "libVersion": "2.29.2",
......
...@@ -22,6 +22,10 @@ const secretKey_items = { ...@@ -22,6 +22,10 @@ const secretKey_items = {
preRelease: { preRelease: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
cdptest:{
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
} }
} }
const scrmSecretKey_items = { const scrmSecretKey_items = {
...@@ -44,15 +48,19 @@ const scrmSecretKey_items = { ...@@ -44,15 +48,19 @@ const scrmSecretKey_items = {
preRelease: { preRelease: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022', appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
},
cdptest:{
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
} }
} }
const domain_items = { const domain_items = {
ip: { ip: {
// dj: 'http://192.168.1.165:8292', // 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.169:8292',//蔡远明
// dj: 'http://192.168.1.174: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.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明 // dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
...@@ -73,10 +81,15 @@ const domain_items = { ...@@ -73,10 +81,15 @@ const domain_items = {
preRelease: { preRelease: {
dj: 'https://dj.beta.glsx.com.cn', dj: 'https://dj.beta.glsx.com.cn',
scrm: 'https://scrm.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 = { module.exports = {
domain: domain_items[target[envIndex]], 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!