web
This commit is contained in:
@@ -14,11 +14,32 @@ const ENV_CONFIG = {
|
||||
},
|
||||
production: {
|
||||
name: '生产环境',
|
||||
description: '线上正式服务器',
|
||||
description: '线上正式服务器(中国区)',
|
||||
apiBase: 'https://tral.cc/api/v1',
|
||||
useMock: false,
|
||||
color: '#f5222d'
|
||||
},
|
||||
'production-cn': {
|
||||
name: '生产环境-中国区',
|
||||
description: '中国区生产服务器',
|
||||
apiBase: 'https://api-cn.your-domain.com/api/v1',
|
||||
useMock: false,
|
||||
color: '#f5222d'
|
||||
},
|
||||
'production-us': {
|
||||
name: '生产环境-美国区',
|
||||
description: '美国区生产服务器',
|
||||
apiBase: 'https://api-us.your-domain.com/api/v1',
|
||||
useMock: false,
|
||||
color: '#fa8c16'
|
||||
},
|
||||
'production-eu': {
|
||||
name: '生产环境-欧洲区',
|
||||
description: '欧洲区生产服务器',
|
||||
apiBase: 'https://api-eu.your-domain.com/api/v1',
|
||||
useMock: false,
|
||||
color: '#13c2c2'
|
||||
},
|
||||
test: {
|
||||
name: '测试环境',
|
||||
description: '测试服务器',
|
||||
@@ -101,7 +122,13 @@ export function checkNetworkConnection() {
|
||||
console.error('❌ 后端服务连接失败:', error);
|
||||
wx.showModal({
|
||||
title: '连接失败',
|
||||
content: `无法连接到后端服务\n${envInfo.apiBase}\n\n请检查:\n1. 后端服务是否启动\n2. 网络连接是否正常\n3. 环境配置是否正确`,
|
||||
content: `无法连接到后端服务
|
||||
${envInfo.apiBase}
|
||||
|
||||
请检查:
|
||||
1. 后端服务是否启动
|
||||
2. 网络连接是否正常
|
||||
3. 环境配置是否正确`,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user