细节优化

This commit is contained in:
kron
2025-06-17 16:58:24 +08:00
parent 9c6964597e
commit 28e3d49e57
4 changed files with 35 additions and 7 deletions

View File

@@ -8,6 +8,8 @@ import ShootProgress from "@/components/ShootProgress.vue";
import ScoreResult from "@/components/ScoreResult.vue";
import ScorePanel from "@/components/ScorePanel.vue";
import Container from "@/components/Container.vue";
import Avatar from "@/components/Avatar.vue";
import BowPower from "@/components/BowPower.vue";
import { createPractiseAPI } from "@/apis";
import { MESSAGETYPES } from "@/constants";
import useStore from "@/store";
@@ -41,6 +43,7 @@ async function onReceiveMessage(content) {
messages.forEach((msg) => {
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
scores.value.push(msg.target);
power.value = msg.target.battery;
if (scores.value.length === total) {
showScore.value = true;
}
@@ -176,11 +179,17 @@ const onClose = () => {
:total="100"
:start="start"
/>
<view class="infos" v-if="step === 4">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
</view>
<BowTarget
:avatar="user.avatar"
:power="power"
:avatar="step === 2 ? user.avatar : ''"
:power="step === 2 ? power : 0"
:debug="step === 2"
v-if="step === 2 || step === 4"
:currentRound="step === 4 ? scores.length : 0"
:totalRound="step === 4 ? total : 0"
:tips="
step === 2 && scores.length > 0
? `本次射程${scores[scores.length - 1].dst / 100}米,${
@@ -221,4 +230,11 @@ const onClose = () => {
width: calc(100% - 20px);
margin: 10px 10px;
}
.infos {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
padding-top: 15px;
}
</style>