diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue index 1c71b33..7fd6338 100644 --- a/src/components/BowTarget.vue +++ b/src/components/BowTarget.vue @@ -296,8 +296,8 @@ const simulShoot2 = async () => { } .stop-sign { position: absolute; - font-size: 40px; - color: #fff; + font-size: 44px; + color: #fff9; text-align: center; width: 200px; height: 60px; diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue index a6580aa..41b9d59 100644 --- a/src/pages/battle-result.vue +++ b/src/pages/battle-result.vue @@ -57,15 +57,9 @@ onMounted(async () => { }); const checkBowData = () => { - if (data.value.mode === 1) { - uni.navigateTo({ - url: `/pages/team-bow-data?battleId=${data.value.id}`, - }); - } else if (data.value.mode === 2) { - uni.navigateTo({ - url: `/pages/melee-bow-data?battleId=${data.value.id}`, - }); - } + uni.navigateTo({ + url: `/pages/match-detail?id=${data.value.id}`, + }); }; @@ -180,7 +174,7 @@ const checkBowData = () => { }} - 查看靶纸 + 查看成绩 退出 { if (battleInfo.startTime < 0) return; start.value = true; step.value = 3; - tips.value = "请连续射出6支箭"; players.value.forEach((p) => { playersScores.value[p.id] = p.arrows; if (p.id === user.value.id) { scores.value = p.arrows; } }); + tips.value = `${ + scores.value.length ? "下半场-" : "上半场-" + }请连续射出6支箭`; const remain = Date.now() / 1000 - battleInfo.startTime; if (remain <= 90) { setTimeout(() => { @@ -346,11 +348,17 @@ async function onReceiveMessage(messages = []) { step.value = 3; seq.value += 1; timerSeq.value = 0; - tips.value = "请连续射出6支箭"; + tips.value = `${ + scores.value.length ? "下半场-" : "上半场-" + }请连续射出6支箭`; total.value = 90; halfTimeTip.value = false; } if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) { + if (!start.value) { + start.value = true; + step.value = 3; + } if (battleType.value === 1) { if (currentShooterId.value !== msg.userId) { seq.value += 1; @@ -394,7 +402,7 @@ async function onReceiveMessage(messages = []) { }); } } - if (battleType.value === 2) { + if (battleType.value === 2 && msg.userId === user.value.id) { scores.value.push(msg.target); power.value = msg.target.battery; } @@ -590,13 +598,13 @@ onUnmounted(() => { :currentShooterId="currentShooterId" /> {