update basenet
This commit is contained in:
parent
843f5b61ab
commit
0af094d272
@ -24,6 +24,22 @@ export var allBaseNet = {
|
|||||||
turkey: '-z4-test.cebg.games',
|
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 netIdHash = (function () {
|
||||||
const result = {};
|
const result = {};
|
||||||
for (let key in allBaseNet) {
|
for (let key in allBaseNet) {
|
||||||
@ -71,7 +87,7 @@ function getCommonParam() {
|
|||||||
export function getNormalApiUrl(name) {
|
export function getNormalApiUrl(name) {
|
||||||
return (
|
return (
|
||||||
functionNet[name] +
|
functionNet[name] +
|
||||||
'-z3-test.cebg.games' +
|
(isDevEnv() ? '-test.kingsome.cn' : '-z3-test.cebg.games') +
|
||||||
'/webapp/index.php?' +
|
'/webapp/index.php?' +
|
||||||
getCommonParam()
|
getCommonParam()
|
||||||
);
|
);
|
||||||
@ -80,7 +96,7 @@ export function getNormalApiUrl(name) {
|
|||||||
export function getExaminingUrl() {
|
export function getExaminingUrl() {
|
||||||
return (
|
return (
|
||||||
functionNet['login'] +
|
functionNet['login'] +
|
||||||
'-z3-test.cebg.games' +
|
(isDevEnv() ? '-test.kingsome.cn' : '-z3-test.cebg.games') +
|
||||||
'/webapp/index.php?' +
|
'/webapp/index.php?' +
|
||||||
getCommonParam()
|
getCommonParam()
|
||||||
);
|
);
|
||||||
@ -88,7 +104,9 @@ export function getExaminingUrl() {
|
|||||||
|
|
||||||
export function getRelationUrl() {
|
export function getRelationUrl() {
|
||||||
return (
|
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) {
|
export function extractZid(url) {
|
||||||
return Number(url[2]);
|
if (isDevEnv()) {
|
||||||
|
return 3;
|
||||||
|
} else {
|
||||||
|
return Number(url[2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getZViewName(zid) {
|
export function getZViewName(zid) {
|
||||||
@ -152,6 +174,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