BUG修复
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user