细节修改
This commit is contained in:
@@ -296,8 +296,8 @@ const simulShoot2 = async () => {
|
||||
}
|
||||
.stop-sign {
|
||||
position: absolute;
|
||||
font-size: 40px;
|
||||
color: #fff;
|
||||
font-size: 44px;
|
||||
color: #fff9;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
height: 60px;
|
||||
|
||||
@@ -57,15 +57,9 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
const checkBowData = () => {
|
||||
if (data.value.mode === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/team-bow-data?battleId=${data.value.id}`,
|
||||
url: `/pages/match-detail?id=${data.value.id}`,
|
||||
});
|
||||
} else if (data.value.mode === 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/melee-bow-data?battleId=${data.value.id}`,
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -180,7 +174,7 @@ const checkBowData = () => {
|
||||
}}
|
||||
</text>
|
||||
<view class="op-btn">
|
||||
<view @click="checkBowData">查看靶纸</view>
|
||||
<view @click="checkBowData">查看成绩</view>
|
||||
<view @click="exit">退出</view>
|
||||
</view>
|
||||
<UserUpgrade
|
||||
|
||||
@@ -155,13 +155,15 @@ onLoad(async (options) => {
|
||||
if (battleInfo.startTime < 0) return;
|
||||
start.value = true;
|
||||
step.value = 3;
|
||||
tips.value = "请连续射出6支箭";
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
if (remain <= 90) {
|
||||
setTimeout(() => {
|
||||
@@ -346,11 +348,17 @@ async function onReceiveMessage(messages = []) {
|
||||
step.value = 3;
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
total.value = 90;
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
||||
if (!start.value) {
|
||||
start.value = true;
|
||||
step.value = 3;
|
||||
}
|
||||
if (battleType.value === 1) {
|
||||
if (currentShooterId.value !== msg.userId) {
|
||||
seq.value += 1;
|
||||
@@ -394,7 +402,7 @@ async function onReceiveMessage(messages = []) {
|
||||
});
|
||||
}
|
||||
}
|
||||
if (battleType.value === 2) {
|
||||
if (battleType.value === 2 && msg.userId === user.value.id) {
|
||||
scores.value.push(msg.target);
|
||||
power.value = msg.target.battery;
|
||||
}
|
||||
@@ -590,13 +598,13 @@ onUnmounted(() => {
|
||||
:currentShooterId="currentShooterId"
|
||||
/>
|
||||
<BowTarget
|
||||
:mode="battleType ? 'team' : 'solo'"
|
||||
:mode="battleType === 1 ? 'team' : 'solo'"
|
||||
:power="start ? power : 0"
|
||||
:currentRound="currentRound"
|
||||
:totalRound="totalRounds"
|
||||
:scores="scores"
|
||||
:blueScores="blueScores"
|
||||
:stop="halfTimeTip && !startCount"
|
||||
:stop="!startCount"
|
||||
/>
|
||||
<BattleFooter
|
||||
v-if="roundResults.length"
|
||||
|
||||
@@ -33,6 +33,7 @@ onLoad(async (options) => {
|
||||
<template>
|
||||
<Container title="靶纸">
|
||||
<view class="container">
|
||||
<image src="../static/battle-header-melee.png" mode="widthFix" />
|
||||
<view class="players" v-if="data.players">
|
||||
<view
|
||||
v-for="(player, index) in data.players"
|
||||
@@ -49,7 +50,6 @@ onLoad(async (options) => {
|
||||
:style="{
|
||||
width: `${Math.max(100 / data.players.length, 18)}vw`,
|
||||
}"
|
||||
mode="widthFix"
|
||||
class="player-bg"
|
||||
/>
|
||||
<Avatar
|
||||
@@ -90,11 +90,18 @@ onLoad(async (options) => {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.container > image:first-child {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.players {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
margin-top: 25px;
|
||||
}
|
||||
.players::-webkit-scrollbar {
|
||||
width: 0;
|
||||
@@ -112,12 +119,13 @@ onLoad(async (options) => {
|
||||
position: relative;
|
||||
height: 68px;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 7px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.player-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 85px;
|
||||
top: 0;
|
||||
}
|
||||
.players > view > text {
|
||||
margin: 5px 0;
|
||||
|
||||
@@ -63,13 +63,15 @@ onLoad(async (options) => {
|
||||
});
|
||||
if (battleInfo.startTime <= 0) return;
|
||||
start.value = true;
|
||||
tips.value = "请连续射出6支箭";
|
||||
players.value.forEach((p) => {
|
||||
playersScores.value[p.id] = p.arrows;
|
||||
if (p.id === user.value.id) {
|
||||
scores.value = p.arrows;
|
||||
}
|
||||
});
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
const remain = Date.now() / 1000 - battleInfo.startTime;
|
||||
if (remain <= 90) {
|
||||
setTimeout(() => {
|
||||
@@ -134,7 +136,9 @@ async function onReceiveMessage(messages = []) {
|
||||
startCount.value = true;
|
||||
seq.value += 1;
|
||||
timerSeq.value = 0;
|
||||
tips.value = "请连续射出6支箭";
|
||||
tips.value = `${
|
||||
scores.value.length ? "下半场-" : "上半场-"
|
||||
}请连续射出6支箭`;
|
||||
halfTimeTip.value = false;
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootResult) {
|
||||
|
||||
@@ -196,7 +196,10 @@ const onPractiseLoading = async (page) => {
|
||||
class="practice-record"
|
||||
@click="() => getPractiseDetail(item.id)"
|
||||
>
|
||||
<text>单组练习 {{ item.createdAt }}</text>
|
||||
<text
|
||||
>{{ item.completed_arrows === 36 ? "耐力挑战" : "单组练习" }}
|
||||
{{ item.createdAt }}</text
|
||||
>
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
</ScrollList>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { onHide } from "@dcloudio/uni-app";
|
||||
import { onShow, onHide } from "@dcloudio/uni-app";
|
||||
import Container from "@/components/Container.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import { getRankListAPI, isGamingAPI } from "@/apis";
|
||||
@@ -37,7 +37,7 @@ const handleSelect = (index) => {
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
onShow(async () => {
|
||||
const result = await getHomeData();
|
||||
currentList.value = result.rank;
|
||||
rankData.value = result;
|
||||
@@ -137,9 +137,10 @@ const updateData = () => {
|
||||
});
|
||||
}
|
||||
};
|
||||
onHide(() => {
|
||||
onShow,
|
||||
() => {
|
||||
showSeasonList.value = false;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -165,6 +165,10 @@ async function onReceiveMessage(messages = []) {
|
||||
});
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
||||
if (!start.value) {
|
||||
start.value = true;
|
||||
step.value = 3;
|
||||
}
|
||||
if (currentShooterId.value !== msg.userId) {
|
||||
seq.value += 1;
|
||||
currentShooterId.value = msg.userId;
|
||||
|
||||
Reference in New Issue
Block a user