添加还在游戏中提示
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import SButton from "@/components/SButton.vue";
|
||||
import { joinRoomAPI, createRoomAPI } from "@/apis";
|
||||
import { joinRoomAPI, createRoomAPI, isGamingAPI } from "@/apis";
|
||||
|
||||
const props = defineProps({
|
||||
onConfirm: {
|
||||
@@ -16,6 +16,11 @@ const loading = ref(false);
|
||||
const roomNumber = ref("");
|
||||
|
||||
const createRoom = async () => {
|
||||
const isGaming = await isGamingAPI();
|
||||
if (isGaming) {
|
||||
uni.$showHint("当前正在对战中");
|
||||
return;
|
||||
}
|
||||
if (loading.value === true) return;
|
||||
loading.value = true;
|
||||
const result = await createRoomAPI(
|
||||
|
||||
Reference in New Issue
Block a user