update basenet
This commit is contained in:
parent
843f5b61ab
commit
0af094d272
@ -24,6 +24,22 @@ export var allBaseNet = {
|
||||
turkey: '-z4-test.cebg.games',
|
||||
};
|
||||
|
||||
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 result = {};
|
||||
for (let key in allBaseNet) {
|
||||
@ -71,7 +87,7 @@ function getCommonParam() {
|
||||
export function getNormalApiUrl(name) {
|
||||
return (
|
||||
functionNet[name] +
|
||||
'-z3-test.cebg.games' +
|
||||
(isDevEnv() ? '-test.kingsome.cn' : '-z3-test.cebg.games') +
|
||||
'/webapp/index.php?' +
|
||||
getCommonParam()
|
||||
);
|
||||
@ -80,7 +96,7 @@ export function getNormalApiUrl(name) {
|
||||
export function getExaminingUrl() {
|
||||
return (
|
||||
functionNet['login'] +
|
||||
'-z3-test.cebg.games' +
|
||||
(isDevEnv() ? '-test.kingsome.cn' : '-z3-test.cebg.games') +
|
||||
'/webapp/index.php?' +
|
||||
getCommonParam()
|
||||
);
|
||||
@ -88,7 +104,9 @@ export function getExaminingUrl() {
|
||||
|
||||
export function getRelationUrl() {
|
||||
return (
|
||||
functionNet['relation'] + '-z3-test.cebg.games' + '/friend/websocket'
|
||||
functionNet['relation'] +
|
||||
(isDevEnv() ? '-test.kingsome.cn' : '-z3-test.cebg.games') +
|
||||
'/friend/websocket'
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,7 +120,11 @@ export function getNodeUrl() {
|
||||
}
|
||||
|
||||
export function extractZid(url) {
|
||||
return Number(url[2]);
|
||||
if (isDevEnv()) {
|
||||
return 3;
|
||||
} else {
|
||||
return Number(url[2]);
|
||||
}
|
||||
}
|
||||
|
||||
export function getZViewName(zid) {
|
||||
@ -152,6 +174,9 @@ function getZName(zid) {
|
||||
}
|
||||
|
||||
export function getGameServer(teamUuid) {
|
||||
if (isDevEnv()) {
|
||||
return 'wss://game2006-test.kingsome.cn/websocket';
|
||||
}
|
||||
const nodeId = teamUuid ? teamUuid.split('_')[0] : cc.SDKManage.NodeId;
|
||||
const zid = teamUuid
|
||||
? teamUuid.split('_')[1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user