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