diff --git a/src/components/BackToGame.vue b/src/components/BackToGame.vue
index 30cb246..a281736 100644
--- a/src/components/BackToGame.vue
+++ b/src/components/BackToGame.vue
@@ -1,5 +1,5 @@
diff --git a/src/websocket.js b/src/websocket.js
index ed721d5..022d766 100644
--- a/src/websocket.js
+++ b/src/websocket.js
@@ -23,7 +23,6 @@ function createWebSocket(token, onMessage) {
// 接收消息
uni.onSocketMessage((res) => {
const data = JSON.parse(res.data);
- // console.log(res);
if (data.event === "pong" || !data.data.updates) return;
if (onMessage) onMessage(data.data.updates);
const msg = data.data.updates[0];
@@ -50,6 +49,9 @@ function createWebSocket(token, onMessage) {
}
}
}
+ if (msg.constructor === MESSAGETYPES.MatchOver) {
+ uni.$emit("game-over");
+ }
if (msg.constructor === MESSAGETYPES.PaySuccess) {
console.log(1111111, msg);
}