diff --git a/src/App.vue b/src/App.vue
index 4e4c22e..4401390 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -74,19 +74,25 @@ button::after {
color: #fed847;
}
-@keyframes fadeIn {
- from {
+@keyframes fadeInOut {
+ 0% {
transform: translateY(20px);
opacity: 0;
}
- to {
+ 30% {
transform: translateY(0);
opacity: 1;
}
+ 80% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ }
}
-.fade-in {
- animation: fadeIn 0.3s ease forwards;
+.fade-in-out {
+ animation: fadeInOut 1s ease forwards;
}
@keyframes fadeOut {
diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue
index dc7f49c..92287bb 100644
--- a/src/components/BowTarget.vue
+++ b/src/components/BowTarget.vue
@@ -100,13 +100,13 @@ watch(
}
);
-function calcRealX(num) {
+function calcRealX(num, offset = 12) {
const len = 20.4 + num;
- return `calc(${(len / 40.8) * 100}% - 6px)`;
+ return `calc(${(len / 40.8) * 100}% - ${offset / 2}px)`;
}
-function calcRealY(num) {
+function calcRealY(num, offset = 12) {
const len = num < 0 ? Math.abs(num) + 20.4 : 20.4 - num;
- return `calc(${(len / 40.8) * 100}% - 6px)`;
+ return `calc(${(len / 40.8) * 100}% - ${offset / 2}px)`;
}
const simulShoot = async () => {
if (device.value.deviceId) await simulShootAPI(device.value.deviceId);
@@ -129,18 +129,30 @@ const simulShoot2 = async () => {
经验 +1
{{ scores[scores.length - 1].ring }}环
{{ blueScores[blueScores.length - 1].ring }}环
@@ -164,38 +176,8 @@ const simulShoot2 = async () => {
}"
>{{ bow.ring }}
-
-
-
- {{ score.ring }}环
+
+ {{ result.arrows[index] ? result.arrows[index].ring : 0
+ }}环
@@ -201,7 +202,8 @@ onMounted(() => {
row-gap: 10px;
column-gap: 5px;
justify-content: flex-start;
- margin: 10px 0;
+ margin-top: 10px;
+ margin-bottom: 15px;
}
.container-content > view:nth-child(2) > view {
background: linear-gradient(#fbfbfb, #f5f5f5);
diff --git a/src/pages/battle-room.vue b/src/pages/battle-room.vue
index a59d2ec..4f59cb2 100644
--- a/src/pages/battle-room.vue
+++ b/src/pages/battle-room.vue
@@ -267,9 +267,11 @@ async function onReceiveMessage(messages = []) {
}
}
if (msg.constructor === MESSAGETYPES.FinalShoot) {
- isFinalShoot.value = true;
- showRoundTip.value = true;
- tips.value = "准备开始决金箭";
+ if (!isFinalShoot.value) {
+ isFinalShoot.value = true;
+ showRoundTip.value = true;
+ tips.value = "准备开始决金箭";
+ }
}
if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
startCount.value = false;
diff --git a/src/pages/melee-match.vue b/src/pages/melee-match.vue
index 3b737cc..51d0a00 100644
--- a/src/pages/melee-match.vue
+++ b/src/pages/melee-match.vue
@@ -148,9 +148,6 @@ const onBack = () => {
uni.navigateBack();
}
};
-const exitRoom = async () => {
- uni.navigateBack();
-};
onMounted(() => {
uni.$on("socket-inbox", onReceiveMessage);
});
@@ -224,9 +221,9 @@ onUnmounted(() => {
-
- 退出比赛
-
+ 排位赛进行过程无法退出
diff --git a/src/pages/practise-two.vue b/src/pages/practise-two.vue
index a3547b7..1517661 100644
--- a/src/pages/practise-two.vue
+++ b/src/pages/practise-two.vue
@@ -84,7 +84,7 @@ onUnmounted(() => {
-
+
diff --git a/src/pages/rank-list.vue b/src/pages/rank-list.vue
index b6cfd31..ccbffed 100644
--- a/src/pages/rank-list.vue
+++ b/src/pages/rank-list.vue
@@ -62,7 +62,7 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
{
uni.navigateBack();
}
};
-const exitRoom = async () => {
- uni.navigateBack();
-};
onMounted(() => {
uni.$on("socket-inbox", onReceiveMessage);
});
@@ -249,11 +249,9 @@ onUnmounted(() => {
/>
-
-
- 退出比赛
-
-
+ 排位赛进行过程无法退出