添加开始游戏前,进行连接检测

This commit is contained in:
kron
2025-06-28 22:44:30 +08:00
parent 77691c411a
commit 21b3e38ff0
9 changed files with 41 additions and 21 deletions

View File

@@ -15,6 +15,7 @@ import PlayersRow from "@/components/PlayersRow.vue";
import SModal from "@/components/SModal.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import { getRoomAPI, destroyRoomAPI, exitRoomAPI, startRoomAPI } from "@/apis";
import { checkConnection } from "@/util";
import { MESSAGETYPES, roundsName, getMessageTypeName } from "@/constants";
import useStore from "@/store";
import { storeToRefs } from "pinia";
@@ -279,6 +280,7 @@ const exitRoom = async () => {
};
onMounted(() => {
checkConnection();
uni.$on("socket-inbox", onReceiveMessage);
});