细节调整

This commit is contained in:
kron
2025-06-17 19:35:21 +08:00
parent 28e3d49e57
commit ab8aa08a35
5 changed files with 55 additions and 44 deletions

View File

@@ -36,20 +36,17 @@ onLoad((options) => {
teamSize.value = options.teamSize;
});
async function startMatch() {
if (gameType.value && teamSize.value) {
await matchGameAPI(true, gameType.value, teamSize.value);
startMatch.value = true;
}
await matchGameAPI(true, gameType.value, teamSize.value);
matching.value = true;
}
async function stopMatch() {
if (gameType.value && teamSize.value) {
await matchGameAPI(false, gameType.value, teamSize.value);
startMatch.value = false;
}
await matchGameAPI(false, gameType.value, teamSize.value);
matching.value = false;
}
async function readyToGo() {
if (battleId.value) {
await readyGameAPI(battleId.value);
scores.value = [];
start.value = true;
timerSeq.value = 0;
}
@@ -118,7 +115,7 @@ onUnmounted(() => {
<Container title="大乱斗排位赛" :bgType="1">
<view class="container">
<BattleHeader v-if="!start && players.length" :players="players" />
<Guide noBg v-if="!start">
<Guide noBg v-if="!start && matching">
<view :style="{ display: 'flex', justifyContent: 'space-between' }">
<view :style="{ display: 'flex', flexDirection: 'column' }">
<text :style="{ color: '#fed847' }">请预先射几箭测试</text>
@@ -128,13 +125,15 @@ onUnmounted(() => {
</view>
</Guide>
<ShootProgress v-if="start" :seq="seq" :start="start" :tips="tips" />
<view class="infos">
<view v-if="start" class="infos">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
</view>
<BowTarget
v-if="matching"
:showE="start"
:currentRound="scores.length"
:totalRound="12"
:totalRound="start ? 12 : 0"
:scores="scores"
/>
<PlayerScore