比赛结果数据源修改

This commit is contained in:
kron
2025-07-15 18:14:59 +08:00
parent 16f8048b55
commit 32baa7279d
6 changed files with 68 additions and 47 deletions

View File

@@ -73,8 +73,8 @@ watch(
onLoad(async (options) => {
if (options.battleId) {
const battleInfo = uni.getStorageSync(`battle-${options.battleId}`);
// console.log("----battleInfo", battleInfo);
const battleInfo = uni.getStorageSync("current-battle");
console.log("----battleInfo", battleInfo);
if (battleInfo) {
battleId.value = battleInfo.id;
start.value = true;
@@ -406,7 +406,7 @@ async function onReceiveMessage(messages = []) {
tips.value = "准备下半场";
}
if (msg.constructor === MESSAGETYPES.MatchOver) {
uni.setStorageSync("battle", msg.endStatus);
uni.setStorageSync("last-battle", msg.endStatus);
uni.redirectTo({
url: `/pages/battle-result?battleId=${msg.id}`,
});
@@ -541,10 +541,10 @@ onUnmounted(() => {
:total="total"
:currentRound="currentRound"
:battleId="battleId"
:melee="room.battleType === 2"
:melee="players.length > 0"
/>
<PlayersRow
v-if="room.battleType === 1"
v-if="blueTeam.length && redTeam.length"
:blueTeam="blueTeam"
:redTeam="redTeam"
:currentShooterId="currentShooterId"