This commit is contained in:
azw 2022-05-31 08:46:49 +08:00
parent 2461915900
commit 99cc1591c3

View File

@ -5,10 +5,8 @@ export var allBaseNet = {
turkey: '-z4-test.cebg.games', turkey: '-z4-test.cebg.games',
}; };
isDevEnv();
function isDevEnv() { function isDevEnv() {
return true return true;
// var toreturn = false // var toreturn = false
// if(cc.debug){ // if(cc.debug){
// return true; // return true;
@ -26,7 +24,7 @@ function isExamining() {
function getDevEnvUrlSuffix() { function getDevEnvUrlSuffix() {
//'-test.kingsome.cn' //'-test.kingsome.cn'
return btoa('LXRlc3Qua2luZ3NvbWUuY24='); return atob('LXRlc3Qua2luZ3NvbWUuY24=');
} }
function getExaminingUrlSuffix() { function getExaminingUrlSuffix() {
@ -181,10 +179,10 @@ function getZName(zid) {
export function getGameServer(teamUuid) { export function getGameServer(teamUuid) {
if (isDevEnv()) { if (isDevEnv()) {
return 'wss://game2006' + getDevEnvUrlSuffix() '/websocket'; return 'wss://game2006' + getDevEnvUrlSuffix() + '/websocket';
} }
if (isExamining()) { if (isExamining()) {
return 'wss://game2006' + getExaminingUrlSuffix() '/websocket'; return 'wss://game2006' + getExaminingUrlSuffix() + '/websocket';
} }
const nodeId = teamUuid ? teamUuid.split('_')[0] : cc.SDKManage.NodeId; const nodeId = teamUuid ? teamUuid.split('_')[0] : cc.SDKManage.NodeId;
const zid = teamUuid const zid = teamUuid