数据完善
This commit is contained in:
@@ -417,8 +417,14 @@ async function onReceiveMessage(messages = []) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||||
|
playersScores.value = {};
|
||||||
|
[
|
||||||
|
...msg.groupUserStatus.redTeam,
|
||||||
|
...msg.groupUserStatus.blueTeam,
|
||||||
|
].forEach((player) => {
|
||||||
|
playersScores.value[player.id] = player.arrows;
|
||||||
|
});
|
||||||
startCount.value = false;
|
startCount.value = false;
|
||||||
total.value = 20;
|
|
||||||
halfTimeTip.value = true;
|
halfTimeTip.value = true;
|
||||||
tips.value = "准备下半场";
|
tips.value = "准备下半场";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ const playersSorted = ref([]);
|
|||||||
const playersScores = ref({});
|
const playersScores = ref({});
|
||||||
const halfTimeTip = ref(false);
|
const halfTimeTip = ref(false);
|
||||||
const onComplete = ref(null);
|
const onComplete = ref(null);
|
||||||
const total = ref(90);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => [players.value, playersScores.value],
|
() => [players.value, playersScores.value],
|
||||||
@@ -145,6 +144,12 @@ async function onReceiveMessage(messages = []) {
|
|||||||
playersScores.value[msg.userId].push(msg.target);
|
playersScores.value[msg.userId].push(msg.target);
|
||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||||
|
playersScores.value = {};
|
||||||
|
[...msg.groupUserStatus.redTeam, ...msg.groupUserStatus.blueTeam].forEach(
|
||||||
|
(player) => {
|
||||||
|
playersScores.value[player.id] = player.arrows;
|
||||||
|
}
|
||||||
|
);
|
||||||
startCount.value = false;
|
startCount.value = false;
|
||||||
halfTimeTip.value = true;
|
halfTimeTip.value = true;
|
||||||
tips.value = "准备下半场";
|
tips.value = "准备下半场";
|
||||||
@@ -203,8 +208,9 @@ onUnmounted(() => {
|
|||||||
:seq="seq"
|
:seq="seq"
|
||||||
:start="start && startCount"
|
:start="start && startCount"
|
||||||
:tips="tips"
|
:tips="tips"
|
||||||
:total="total"
|
:total="90"
|
||||||
:melee="true"
|
:melee="true"
|
||||||
|
:battleId="battleId"
|
||||||
/>
|
/>
|
||||||
<view v-if="start" class="user-row">
|
<view v-if="start" class="user-row">
|
||||||
<Avatar :src="user.avatar" :size="35" />
|
<Avatar :src="user.avatar" :size="35" />
|
||||||
|
|||||||
Reference in New Issue
Block a user