部分问题修复

This commit is contained in:
2026-01-17 17:22:59 +08:00
parent 410b0501af
commit 85354f6296
4 changed files with 23 additions and 5 deletions

View File

@@ -25,8 +25,8 @@ export function returnBaseUrl(param) {
env,
apiType
} = param
if(!env){
env=ENV
if (!env) {
env = ENV
}
console.log('env', env);
console.log('apiType', apiType);
@@ -70,6 +70,23 @@ export function returnBaseUrl(param) {
}
function returnWss(env) {
// #ifdef H5
if (env === 'test') {
return 'http://192.168.1.42:2348'
} else {
return 'https://czgeatws.sxczgkj.com/wss'
}
// #endif
// #ifndef H5
if (env === 'test') {
return 'ws://192.168.1.42:2348'
} else {
return 'wss://czgeatws.sxczgkj.com/wss'
}
// #endif
}
const appConfig = {
@@ -85,7 +102,7 @@ const appConfig = {
env: {},
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
wss: "wss://czgeatws.sxczgkj.com/wss", //正式环境
wss: returnWss(), //正式环境
// 环境变量常量
ENV_ENUM: {
DEVELOPMENT: 'development', // 本地调试地址