Merge branch 'new-race-mode' into test
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
@@ -314,10 +314,12 @@ onShow(async () => {
|
||||
<template>
|
||||
<Container :bgType="start ? 3 : 1">
|
||||
<view class="container">
|
||||
<!-- winner=0 表示对局尚未开始,不显示胜者徽章 -->
|
||||
<BattleHeader
|
||||
v-if="start === false"
|
||||
:redTeam="redTeam"
|
||||
:blueTeam="blueTeam"
|
||||
:winner="0"
|
||||
/>
|
||||
<TestDistance v-if="start === false" :guide="false" :isBattle="true"/>
|
||||
<view v-if="start" class="players-row">
|
||||
|
||||
Reference in New Issue
Block a user