细节完善

This commit is contained in:
kron
2025-08-15 11:23:23 +08:00
parent 2a9a373743
commit b46bc7aaa5
9 changed files with 121 additions and 80 deletions

View File

@@ -130,17 +130,10 @@ function recoverData(battleInfo) {
// if (battleInfo.status !== 11) return;
if (battleInfo.firePlayerIndex) {
currentShooterId.value = battleInfo.firePlayerIndex;
// const teamPrefix =
// redTeam.value[0].id === currentShooterId.value
// ? "请红队射箭 - "
// : "请蓝队射箭 - ";
// const roundSuffix = isFinalShoot.value
// ? "决金箭"
// : `第${roundsName[currentRound.value]}轮`;
tips.value =
redTeam.value[0].id === currentShooterId.value
? "请红队射箭"
: "请蓝队射箭";
const redPlayer = redTeam.value.find(
(item) => item.id === currentShooterId.value
);
tips.value = redPlayer ? "请红队射箭" : "请蓝队射箭";
uni.$emit("update-tips", tips.value);
}
if (battleInfo.fireTime > 0) {
@@ -171,17 +164,16 @@ async function onReceiveMessage(messages = []) {
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
if (currentShooterId.value !== msg.userId) {
currentShooterId.value = msg.userId;
// const teamPrefix =
// redTeam.value[0].id === currentShooterId.value
// ? "请红队射箭 - "
// : "请蓝队射箭 - ";
// const roundSuffix = isFinalShoot.value
// ? "决金箭"
// : `第${roundsName[currentRound.value]}轮`;
tips.value =
redTeam.value[0].id === currentShooterId.value
? "请红队射箭"
: "请蓝队射箭";
const redPlayer = redTeam.value.find(
(item) => item.id === currentShooterId.value
);
tips.value = redPlayer ? "请红队射箭" : "请蓝队射箭";
uni.$emit("update-tips", tips.value);
// if (redPlayer) tips.value = "红队" + redPlayer.id;
// const bluePlayer = blueTeam.value.find(
// (item) => item.id === currentShooterId.value
// );
// if (bluePlayer) tips.value = "蓝队" + bluePlayer.id;
uni.$emit("update-tips", tips.value);
}
}
@@ -331,6 +323,7 @@ onHide(() => {
:roundResults="roundResults"
:redPoints="redPoints"
:bluePoints="bluePoints"
:power="power"
/>
<Timer v-if="!start" />
<ScreenHint