电量显示走接口请求
This commit is contained in:
@@ -22,7 +22,6 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const arrow = ref({});
|
||||
const power = ref(0);
|
||||
const distance = ref(0);
|
||||
const debugInfo = ref("");
|
||||
const showsimul = ref(false);
|
||||
@@ -49,7 +48,6 @@ async function onReceiveMessage(messages = []) {
|
||||
messages.forEach((msg) => {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||
arrow.value = msg.target;
|
||||
power.value = msg.target.battery;
|
||||
distance.value = Number((msg.target.dst / 100).toFixed(2));
|
||||
debugInfo.value = msg.target;
|
||||
audioManager.play("距离合格");
|
||||
@@ -120,7 +118,7 @@ onBeforeUnmount(() => {
|
||||
</view>
|
||||
<view class="user-row">
|
||||
<Avatar :src="user.avatar" :size="35" />
|
||||
<BowPower :power="power" />
|
||||
<BowPower />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isBattle" class="ready-timer">
|
||||
|
||||
Reference in New Issue
Block a user