细节优化
This commit is contained in:
@@ -263,14 +263,6 @@ async function onReceiveMessage(messages = []) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const onLeaveRoom = () => {
|
|
||||||
if (owner.value.id === user.value.id) {
|
|
||||||
showModal.value = true;
|
|
||||||
} else {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const destroyRoom = async () => {
|
const destroyRoom = async () => {
|
||||||
if (roomNumber.value) await destroyRoomAPI(roomNumber.value);
|
if (roomNumber.value) await destroyRoomAPI(roomNumber.value);
|
||||||
};
|
};
|
||||||
@@ -293,7 +285,7 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Container title="对战" :onBack="onLeaveRoom">
|
<Container title="对战" :onBack="() => (showModal = true)">
|
||||||
<view class="standby-phase" v-if="step === 1">
|
<view class="standby-phase" v-if="step === 1">
|
||||||
<Guide>
|
<Guide>
|
||||||
<view :style="{ display: 'flex', flexDirection: 'column' }">
|
<view :style="{ display: 'flex', flexDirection: 'column' }">
|
||||||
|
|||||||
Reference in New Issue
Block a user