新版房间1v1对战数据调试完成
This commit is contained in:
@@ -179,13 +179,13 @@ const playSound = (key) => {
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
uni.$on("update-ramain", resetTimer);
|
||||
uni.$on("update-remain", resetTimer);
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
uni.$on("play-sound", playSound);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
uni.$off("update-ramain", resetTimer);
|
||||
uni.$off("update-remain", resetTimer);
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
uni.$off("play-sound", playSound);
|
||||
if (timer.value) clearInterval(timer.value);
|
||||
|
||||
Reference in New Issue
Block a user