细节完善
This commit is contained in:
@@ -138,6 +138,9 @@ onLoad(async (options) => {
|
||||
players.value = [...battleInfo.blueTeam, ...battleInfo.redTeam];
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
if (battleInfo.startTime) {
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
@@ -330,8 +333,8 @@ async function onReceiveMessage(messages = []) {
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
scores.value = [];
|
||||
total.value = 90;
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
||||
if (battleType.value === 1) {
|
||||
|
||||
@@ -222,12 +222,7 @@ const onClose = () => {
|
||||
<view style="height: 570px" v-if="step === 1">
|
||||
<Swiper :onChange="onSwiperIndexChange" :data="guideImages" />
|
||||
</view>
|
||||
<ShootProgress
|
||||
v-if="step === 4"
|
||||
tips="请开始连续射箭"
|
||||
:total="100"
|
||||
:start="start"
|
||||
/>
|
||||
<ShootProgress v-if="step === 4" tips="请开始连续射箭" :start="start" />
|
||||
<TestDistance v-if="step === 2" :guide="false" />
|
||||
<view
|
||||
class="user-row"
|
||||
|
||||
@@ -64,6 +64,9 @@ onLoad(async (options) => {
|
||||
players.value = [...battleInfo.blueTeam, ...battleInfo.redTeam];
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
if (battleInfo.startTime) {
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
@@ -72,7 +75,6 @@ onLoad(async (options) => {
|
||||
uni.$emit("update-ramain", remain);
|
||||
}, 300);
|
||||
} else if (remain > 90 && remain <= 110) {
|
||||
halfTimeTip.value = true;
|
||||
startCount.value = false;
|
||||
tips.value = "准备下半场";
|
||||
} else if (remain > 110) {
|
||||
@@ -123,6 +125,7 @@ async function onReceiveMessage(messages = []) {
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = [];
|
||||
});
|
||||
uni.$hideHint();
|
||||
};
|
||||
}
|
||||
if (msg.id !== battleId.value) return;
|
||||
@@ -132,7 +135,7 @@ async function onReceiveMessage(messages = []) {
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
scores.value = [];
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootResult) {
|
||||
if (msg.userId === user.value.id) {
|
||||
|
||||
Reference in New Issue
Block a user