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

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

@@ -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);
});