细节调整

This commit is contained in:
kron
2025-11-10 09:26:51 +08:00
parent 571073d7ec
commit 2cf55dcdde
2 changed files with 8 additions and 3 deletions

View File

@@ -171,7 +171,8 @@ function recoverData(battleInfo) {
(item) => item.id === currentShooterId.value
);
let nextTips = redPlayer ? "请红队射箭" : "请蓝队射箭";
if (battleInfo.firePlayerIndex === user.value.id) nextTips += "";
nextTips += "重回";
// if (battleInfo.firePlayerIndex === user.value.id) nextTips += "你";
tips.value = nextTips;
uni.$emit("update-tips", nextTips);
}
@@ -199,8 +200,11 @@ async function onReceiveMessage(messages = []) {
const redPlayer = redTeam.value.find(
(item) => item.id === currentShooterId.value
);
let nextTips = redPlayer ? "请红队射箭" : "请蓝队射箭";
if (msg.userId === user.value.id) nextTips += "你";
if (msg.userId === user.value.id && redTeam.value.length > 1) {
nextTips += "你";
}
if (nextTips !== tips.value) {
tips.value = nextTips;
uni.$emit("update-tips", tips.value);