update
This commit is contained in:
parent
f5075e3450
commit
aedc9be7db
@ -24,7 +24,9 @@ export var allBaseNet = {
|
|||||||
turkey: "-z4-test.cebg.games",
|
turkey: "-z4-test.cebg.games",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (true) {
|
export var isDev = true;
|
||||||
|
|
||||||
|
if (isDev) {
|
||||||
console.log("测试服");
|
console.log("测试服");
|
||||||
allBaseNet = {
|
allBaseNet = {
|
||||||
usa: "-test.kingsome.cn",
|
usa: "-test.kingsome.cn",
|
||||||
@ -114,7 +116,11 @@ export function getNodeUrl() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function extractZid(url) {
|
export function extractZid(url) {
|
||||||
return Number(url[2]);
|
if (url != "-test.kingsome.cn") {
|
||||||
|
return Number(url[2]);
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getZViewName(zid) {
|
export function getZViewName(zid) {
|
||||||
@ -148,12 +154,11 @@ export function getZViewName(zid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getCurrentZid() {
|
export function getCurrentZid() {
|
||||||
// try {
|
try {
|
||||||
// return extractZid(localStorage.getItem("currentNet"));
|
return this.extractZid(localStorage.getItem("currentNet"));
|
||||||
// } catch (err) {
|
} catch (err) {
|
||||||
// return 0;
|
return 0;
|
||||||
// }
|
}
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getZUrl(zid) {
|
function getZUrl(zid) {
|
||||||
@ -165,7 +170,7 @@ function getZName(zid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getGameServer(teamUuid) {
|
export function getGameServer(teamUuid) {
|
||||||
if (true) {
|
if (isDev) {
|
||||||
return "wss://game2006-test.kingsome.cn/websocket";
|
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;
|
||||||
|
@ -178,6 +178,7 @@ cc.Class({
|
|||||||
console.log("search by name");
|
console.log("search by name");
|
||||||
tmp = this.edit_find.string;
|
tmp = this.edit_find.string;
|
||||||
NetManage.searchUserByName(tmp, (res) => {
|
NetManage.searchUserByName(tmp, (res) => {
|
||||||
|
console.log(JSON.stringify(res));
|
||||||
if (res.info.account_id != SDKManage.account_id) {
|
if (res.info.account_id != SDKManage.account_id) {
|
||||||
this.setToNone();
|
this.setToNone();
|
||||||
this.initOne(3, res.info);
|
this.initOne(3, res.info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user