fix:删除冗余代码

This commit is contained in:
2026-05-14 13:34:34 +08:00
parent 245daaff9b
commit 2c0edb533e

View File

@@ -9,7 +9,6 @@ import Avatar from "@/components/Avatar.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import {
getRoomAPI,
destroyRoomAPI,
exitRoomAPI,
startRoomAPI,
chooseTeamAPI,
@@ -65,7 +64,6 @@ const goBattle = ref(false);
async function refreshRoomData() {
if (!roomNumber.value) return;
const result = await getRoomAPI(roomNumber.value);
console.log(result);
if (result.started) return;
room.value = result;
// 加入者通过 API 返回的 targetType 字段同步靶纸尺寸,并持久化到本地缓存
@@ -136,10 +134,6 @@ async function refreshRoomData() {
// timer.value = setTimeout(refreshRoomData, 2000);
}
const startGame = async () => {
const result = await startRoomAPI(room.value.number);
};
const getReady = async () => {
await getReadyAPI(roomNumber.value);
};
@@ -214,10 +208,6 @@ const chooseTeam = async (team) => {
refreshMembers(result.members);
};
const destroyRoom = async () => {
if (roomNumber.value) await destroyRoomAPI(roomNumber.value);
};
const exitRoom = async () => {
uni.navigateBack();
};