From a782e141ab011aba2c1dd455533185c572e2797d Mon Sep 17 00:00:00 2001 From: kron Date: Wed, 18 Jun 2025 02:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis.js | 7 +++++++ src/components/BattleHeader.vue | 18 ++++++++++++++--- src/components/MeleeResult.vue | 2 +- src/components/TeamResult.vue | 2 +- src/pages/match-detail.vue | 2 ++ src/pages/my-growth.vue | 35 +++++++++++++++++++++------------ 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/apis.js b/src/apis.js index 48bca6b..31add74 100644 --- a/src/apis.js +++ b/src/apis.js @@ -212,9 +212,16 @@ export const getBattleListAPI = async (page, battleType) => { mode: item.battleStats.mode, createdAt: item.battleStats.createdAt, gameEndAt: item.battleStats.gameEndAt, + winner: item.battleStats.winner, players: item.playerStats .map((p) => p.playerBattleStats) .sort((a, b) => b.totalScore - a.totalScore), + redPlayers: item.playerStats + .filter((p) => p.playerBattleStats.team === 0) + .map((p) => p.playerBattleStats), + bluePlayers: item.playerStats + .filter((p) => p.playerBattleStats.team === 1) + .map((p) => p.playerBattleStats), }); }); return data; diff --git a/src/components/BattleHeader.vue b/src/components/BattleHeader.vue index 35ddba0..173e4c2 100644 --- a/src/components/BattleHeader.vue +++ b/src/components/BattleHeader.vue @@ -13,6 +13,14 @@ defineProps({ type: Array, default: () => [], }, + showRank: { + type: Boolean, + default: false, + }, + winner: { + type: Number, + default: 1, + }, }); const bgColors = ["#364469", "#692735", "#934B4B", "#A98B69", "#8268A2 "]; @@ -29,7 +37,11 @@ const bgColors = ["#364469", "#692735", "#934B4B", "#A98B69", "#8268A2 "]; :key="index" :style="{ backgroundColor: bgColors[index] }" > - + {{ player.name }} @@ -38,7 +50,7 @@ const bgColors = ["#364469", "#692735", "#934B4B", "#A98B69", "#8268A2 "]; {{ blueTeam[0].name }} @@ -47,7 +59,7 @@ const bgColors = ["#364469", "#692735", "#934B4B", "#A98B69", "#8268A2 "]; {{ redTeam[0].name }} diff --git a/src/components/MeleeResult.vue b/src/components/MeleeResult.vue index 2dfca46..ee16481 100644 --- a/src/components/MeleeResult.vue +++ b/src/components/MeleeResult.vue @@ -76,7 +76,7 @@ watch( class="score-item" :style="{ width: '13vw', height: '13vw' }" > - {{ score.ringScore }} + {{ score.ring }} diff --git a/src/components/TeamResult.vue b/src/components/TeamResult.vue index 1cfaf30..3883bd7 100644 --- a/src/components/TeamResult.vue +++ b/src/components/TeamResult.vue @@ -115,7 +115,7 @@ watch( class="score-item" :style="{ width: '13vw', height: '13vw' }" > - {{ score.ringScore }} + {{ score.ring }} diff --git a/src/pages/match-detail.vue b/src/pages/match-detail.vue index ead8da0..ac0215b 100644 --- a/src/pages/match-detail.vue +++ b/src/pages/match-detail.vue @@ -57,9 +57,11 @@ onLoad(async (options) => {