添加开始游戏前,进行连接检测
This commit is contained in:
@@ -9,7 +9,7 @@ import SButton from "@/components/SButton.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
||||
import { generateCanvasImage } from "@/util";
|
||||
import { generateCanvasImage, checkConnection } from "@/util";
|
||||
import { MESSAGETYPES, roundsName } from "@/constants";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
@@ -62,6 +62,7 @@ async function onComplete() {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
checkConnection();
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user