添加开始游戏前,进行连接检测
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user