电量显示走接口请求

This commit is contained in:
kron
2025-10-29 17:26:27 +08:00
parent 7036135d9c
commit f5d5475ee4
11 changed files with 30 additions and 37 deletions

View File

@@ -33,7 +33,6 @@ const stepButtonTexts = [
const title = ref("新手试炼场");
const start = ref(false);
const practiseResult = ref({});
const power = ref(0);
const btnDisabled = ref(false);
const practiseId = ref("");
const showGuide = ref(false);
@@ -66,11 +65,10 @@ async function onReceiveMessage(messages = []) {
if (scores.value.length < total) {
scores.value.push(msg.target);
}
power.value = msg.target.battery;
// if (step.value === 2 && msg.target.dst / 100 >= 5) {
btnDisabled.value = false;
showGuide.value = true;
// }
if (step.value === 2 && msg.target.dst / 100 >= 5) {
btnDisabled.value = false;
showGuide.value = true;
}
}
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
if (practiseId.value && practiseId.value === msg.practice.id) {
@@ -230,7 +228,7 @@ const onClose = () => {
:style="{ marginBottom: step === 2 ? '40px' : '0' }"
>
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
<BowPower />
</view>
<BowTarget
v-if="step === 4"