BUG修复

This commit is contained in:
kron
2025-07-23 17:10:34 +08:00
parent 46ec2ade9a
commit 08aa7e93f5
2 changed files with 2 additions and 2 deletions

View File

@@ -529,7 +529,7 @@ onUnmounted(() => {
keepScreenOn: false, keepScreenOn: false,
}); });
uni.$off("socket-inbox", onReceiveMessage); uni.$off("socket-inbox", onReceiveMessage);
if (owner.value.id !== user.value.id && !battleId.value) { if (roomNumber.value && owner.value.id !== user.value.id && !battleId.value) {
exitRoomAPI(roomNumber.value); exitRoomAPI(roomNumber.value);
} }
}); });

View File

@@ -3,7 +3,7 @@ import { defineStore } from "pinia";
const defaultUser = { const defaultUser = {
id: "", id: "",
nickName: "游客", nickName: "游客",
avatar: "../static/avatar.png", avatar: "../static/user-icon.png",
trio: 0, // 大于1表示完成了新手引导 trio: 0, // 大于1表示完成了新手引导
lvlName: "", lvlName: "",
}; };