From 1e4ce52a935a49e80e9c22580ab18715e334c663 Mon Sep 17 00:00:00 2001 From: kron Date: Tue, 29 Jul 2025 22:15:45 +0800 Subject: [PATCH] fix bug --- src/pages/battle-result.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue index 51c0650..79bd22a 100644 --- a/src/pages/battle-result.vue +++ b/src/pages/battle-result.vue @@ -23,7 +23,7 @@ function exit() { onLoad(async (options) => { if (options.battleId) { const result = await getGameAPI( - options.battleId || "BATTLE-1753274533670200664-192" + options.battleId || "BATTLE-1753787456813171958-86" // options.battleId || "BATTLE-1753239612271030113-788" ); const battleInfo = uni.getStorageSync("last-battle"); @@ -31,7 +31,6 @@ onLoad(async (options) => { ...result, id: options.battleId, battleMode: result.gameMode, - playerStats: result.players.map((p) => ({ ...p, id: p.playerId })), }; if (result.mode === 1 && result.redPlayers[user.value.id]) { totalPoints.value = result.redPlayers[user.value.id].totalScore; @@ -42,6 +41,10 @@ onLoad(async (options) => { ifWin.value = result.winner === 1; } if (result.mode === 2) { + data.value.playerStats = result.players.map((p) => ({ + ...p, + id: p.playerId, + })); const mine = result.players.find((p) => p.playerId === user.value.id); if (mine) totalPoints.value = mine.totalScore; rank.value =