mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 00:26:11 +00:00
update
This commit is contained in:
@@ -21,8 +21,9 @@ import { SpriteFrame } from "cc";
|
||||
import Loading from "../../extensions/ngame/assets/ngame/util/Loading";
|
||||
import { TB, Tables } from "../resources/config/data/schema";
|
||||
import { JsonAsset } from "cc";
|
||||
import { GAction } from "./GActionEnum";
|
||||
|
||||
let IP = "kyu.jisol.cn";
|
||||
let IP = "localhost";
|
||||
|
||||
//重写UI
|
||||
class JNGLayer extends JNLayer{
|
||||
@@ -32,8 +33,16 @@ class JNGLayer extends JNLayer{
|
||||
|
||||
//重写Socket
|
||||
class JNGSocket extends JNSocket{
|
||||
async onInit() {
|
||||
this.on(GAction.TOKEN_EXPIRED,this.onTokenExpired.bind(this));
|
||||
await super.onInit();
|
||||
}
|
||||
public url() {
|
||||
return `ws://${IP}:8080/websocket`;
|
||||
return `ws://${IP}:8080/websocket/b113a866e5664f46b386c12c985d394a`;
|
||||
}
|
||||
//Token失效
|
||||
onTokenExpired(){
|
||||
console.log("onTokenExpired");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user