电量显示走接口请求
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -22,7 +22,6 @@ const start = ref(false);
|
||||
const startCount = ref(true);
|
||||
const battleId = ref("");
|
||||
const currentRound = ref(1);
|
||||
const power = ref(0);
|
||||
const scores = ref([]);
|
||||
const tips = ref("即将开始...");
|
||||
const players = ref([]);
|
||||
@@ -120,7 +119,6 @@ async function onReceiveMessage(messages = []) {
|
||||
if (!start.value) getCurrentGameAPI();
|
||||
if (msg.userId === user.value.id) {
|
||||
scores.value.push({ ...msg.target });
|
||||
power.value = msg.target.battery;
|
||||
}
|
||||
playersScores.value[msg.userId].push({ ...msg.target });
|
||||
}
|
||||
@@ -203,7 +201,7 @@ onHide(() => {
|
||||
/>
|
||||
<view v-if="start" class="user-row">
|
||||
<Avatar :src="user.avatar" :size="35" />
|
||||
<BowPower :power="power" />
|
||||
<BowPower />
|
||||
</view>
|
||||
<BowTarget
|
||||
v-if="start"
|
||||
|
||||
@@ -22,7 +22,6 @@ const scores = ref([]);
|
||||
const total = 12;
|
||||
const currentRound = ref(0);
|
||||
const practiseResult = ref({});
|
||||
const power = ref(0);
|
||||
const practiseId = ref("");
|
||||
const showGuide = ref(false);
|
||||
|
||||
@@ -53,7 +52,6 @@ async function onReceiveMessage(messages = []) {
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
power.value = msg.target.battery;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
|
||||
if (practiseId.value && practiseId.value === msg.practice.id) {
|
||||
@@ -128,7 +126,7 @@ onBeforeUnmount(() => {
|
||||
<text>还有两场,坚持</text>
|
||||
<text>就是胜利!💪</text>
|
||||
</BubbleTip>
|
||||
<BowPower :power="power" />
|
||||
<BowPower />
|
||||
</view>
|
||||
<BowTarget
|
||||
:totalRound="start ? total / 4 : 0"
|
||||
|
||||
@@ -21,7 +21,6 @@ const start = ref(false);
|
||||
const scores = ref([]);
|
||||
const total = 36;
|
||||
const practiseResult = ref({});
|
||||
const power = ref(0);
|
||||
const practiseId = ref("");
|
||||
const showGuide = ref(false);
|
||||
|
||||
@@ -47,7 +46,6 @@ async function onReceiveMessage(messages = []) {
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
power.value = msg.target.battery;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
|
||||
if (practiseId.value && practiseId.value === msg.practice.id) {
|
||||
@@ -115,7 +113,7 @@ onBeforeUnmount(() => {
|
||||
<text>完成过半,胜利</text>
|
||||
<text>在望!💪</text>
|
||||
</BubbleTip>
|
||||
<BowPower :power="power" />
|
||||
<BowPower />
|
||||
</view>
|
||||
<BowTarget
|
||||
:currentRound="scores.length"
|
||||
|
||||
@@ -337,7 +337,6 @@ onHide(() => {
|
||||
<BowTarget
|
||||
v-if="start"
|
||||
mode="team"
|
||||
:power="start ? power : 0"
|
||||
:scores="scores"
|
||||
:blueScores="blueScores"
|
||||
/>
|
||||
@@ -347,7 +346,6 @@ onHide(() => {
|
||||
:redPoints="redPoints"
|
||||
:bluePoints="bluePoints"
|
||||
:goldenRound="goldenRound"
|
||||
:power="power"
|
||||
/>
|
||||
<ScreenHint
|
||||
:show="showRoundTip"
|
||||
|
||||
@@ -319,7 +319,6 @@ onHide(() => {
|
||||
<BowTarget
|
||||
v-if="start"
|
||||
mode="team"
|
||||
:power="start ? power : 0"
|
||||
:currentRound="scores.length"
|
||||
:totalRound="3"
|
||||
:scores="scores"
|
||||
|
||||
Reference in New Issue
Block a user