Update BaseNet.js
This commit is contained in:
parent
bc1d37b98a
commit
af55b31f26
@ -22,9 +22,24 @@ export var allBaseNet = {
|
|||||||
japan: '-z2-test.cebg.games',
|
japan: '-z2-test.cebg.games',
|
||||||
singapore: '-z3-test.cebg.games',
|
singapore: '-z3-test.cebg.games',
|
||||||
turkey: '-z4-test.cebg.games',
|
turkey: '-z4-test.cebg.games',
|
||||||
// test: '-test.kingsome.cn',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
isDevEnv();
|
||||||
|
|
||||||
|
function isDevEnv() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDevEnv()) {
|
||||||
|
console.log('测试服');
|
||||||
|
allBaseNet = {
|
||||||
|
usa: '-test.kingsome.cn',
|
||||||
|
japan: '-test.kingsome.cn',
|
||||||
|
singapore: '-test.kingsome.cn',
|
||||||
|
turkey: '-test-kingsome.cn',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const netIdHash = (function () {
|
const netIdHash = (function () {
|
||||||
const result = {};
|
const result = {};
|
||||||
for (let key in allBaseNet) {
|
for (let key in allBaseNet) {
|
||||||
@ -153,6 +168,9 @@ function getZName(zid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getGameServer(teamUuid) {
|
export function getGameServer(teamUuid) {
|
||||||
|
if (isDevEnv()) {
|
||||||
|
return 'wss://game2006-test.kingsome.cn/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
|
||||||
? teamUuid.split('_')[1]
|
? teamUuid.split('_')[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user