比赛结果数据源修改
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user