比赛详情添加决金箭部分

This commit is contained in:
kron
2025-07-06 12:36:20 +08:00
parent 0d21675013
commit dd51cfb81d
4 changed files with 105 additions and 41 deletions

View File

@@ -156,7 +156,11 @@ export const getGameAPI = async (battleId) => {
const result = await request("POST", "/user/battle/detail", {
id: battleId,
});
const { battleStats = {}, playerStats = {} } = result;
const {
battleStats = {},
playerStats = {},
goldenRoundRecords = [],
} = result;
const data = {
mode: battleStats.mode,
gameMode: battleStats.gameMode,
@@ -166,6 +170,7 @@ export const getGameAPI = async (battleId) => {
data.roundsData = {};
data.redPlayers = {};
data.bluePlayers = {};
data.goldenRound = goldenRoundRecords.length ? goldenRoundRecords[0] : null;
playerStats.forEach((item) => {
const { playerBattleStats = {}, roundRecords = [] } = item;
if (playerBattleStats.team === 0) {