BUG修复

This commit is contained in:
kron
2025-07-13 21:06:48 +08:00
parent fa959c73aa
commit d73d52f752
4 changed files with 83 additions and 17 deletions

View File

@@ -47,7 +47,7 @@ const isFinalShoot = ref(false);
onLoad(async (options) => {
if (options.battleId) {
const battleInfo = uni.getStorageSync(`battle-${options.battleId}`);
console.log("----battleInfo", battleInfo);
// console.log("----battleInfo", battleInfo);
if (battleInfo) {
battleId.value = battleInfo.id;
start.value = true;
@@ -58,6 +58,21 @@ onLoad(async (options) => {
redPoints.value = battleInfo.redScore;
totalRounds.value = battleInfo.maxRound;
roundResults.value = battleInfo.roundResults;
if (
battleInfo.redTeam[0].shotHistory[battleInfo.currentRound] ||
battleInfo.blueTeam[0].shotHistory[battleInfo.currentRound]
) {
roundResults.value.push({
redArrows: battleInfo.redTeam[0].shotHistory[battleInfo.currentRound],
blueArrows:
battleInfo.blueTeam[0].shotHistory[battleInfo.currentRound],
});
} else if (battleInfo.currentRound < 5) {
roundResults.value.push({
redArrows: [],
blueArrows: [],
});
}
if (battleInfo.firePlayerIndex) {
currentShooterId.value = battleInfo.firePlayerIndex;
if (redTeam.value[0].id === currentShooterId.value) {