diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue
index bf26e7c..f37adf3 100644
--- a/src/components/BowTarget.vue
+++ b/src/components/BowTarget.vue
@@ -90,9 +90,7 @@ function calcRealY(num) {
class="e-value fade-in"
>经验 +1
- {{ scores[scores.length - 1].ring }}环
{
const sum = (Number(a) || 0) + (Number(b) || 0) + (Number(c) || 0);
return sum > 0 ? sum + "环" : "-";
};
+const roundsName = ["第一轮", "第二轮", "第三轮", "第四轮"];
- 总成绩
+ 总成绩
{{ scores.reduce((last, next) => last + next, 0) }}环
- {{ title }}
+ {{ roundsName[index] }}
{{
- scores[index * 4 + 0] ? scores[index * 4 + 0] + "环" : "-"
+ scores[index * 3 + 0] ? scores[index * 3 + 0] + "环" : "-"
}}
{{
- scores[index * 4 + 1] ? scores[index * 4 + 1] + "环" : "-"
+ scores[index * 3 + 1] ? scores[index * 3 + 1] + "环" : "-"
}}
{{
- scores[index * 4 + 2] ? scores[index * 4 + 2] + "环" : "-"
+ scores[index * 3 + 2] ? scores[index * 3 + 2] + "环" : "-"
}}
- {{
- scores[index * 4 + 3] ? scores[index * 4 + 3] + "环" : "-"
- }}
- {{
+ {{
getSum(
- scores[index * 4 + 0],
- scores[index * 4 + 1],
- scores[index * 4 + 2],
- scores[index * 4 + 3]
+ scores[index * 3 + 0],
+ scores[index * 3 + 1],
+ scores[index * 3 + 2]
)
}}
@@ -54,11 +51,11 @@ const getSum = (a, b, c) => {
justify-content: flex-start;
}
.container > view {
- width: 100%;
+ width: calc(100% - 30px);
color: aliceblue;
display: flex;
justify-content: space-between;
- padding: 12px 0;
+ padding: 12px 15px;
border-bottom: 1px solid #ffffff66;
font-size: 14px;
color: #fffc;
@@ -69,7 +66,7 @@ const getSum = (a, b, c) => {
}
.container text {
display: block;
- width: 20vw;
+ width: 20%;
text-align: center;
}
diff --git a/src/components/ShootProgress.vue b/src/components/ShootProgress.vue
index 9d01545..adc8a38 100644
--- a/src/components/ShootProgress.vue
+++ b/src/components/ShootProgress.vue
@@ -95,6 +95,7 @@ watch(
padding: 0 15px;
color: #fed847;
z-index: 1;
+ transform: translateX(-10px);
}
.container > view:first-child > image:first-child {
width: 80px;
diff --git a/src/pages/practise-one.vue b/src/pages/practise-one.vue
index 536a05c..dcc6769 100644
--- a/src/pages/practise-one.vue
+++ b/src/pages/practise-one.vue
@@ -6,6 +6,8 @@ import BowTarget from "@/components/BowTarget.vue";
import ScorePanel2 from "@/components/ScorePanel2.vue";
import ScoreResult from "@/components/ScoreResult.vue";
import SButton from "@/components/SButton.vue";
+import Avatar from "@/components/Avatar.vue";
+import BowPower from "@/components/BowPower.vue";
import { createPractiseAPI } from "@/apis";
import { MESSAGETYPES, roundsName } from "@/constants";
import useStore from "@/store";
@@ -16,8 +18,9 @@ const start = ref(false);
const showScore = ref(false);
const scores = ref([]);
const total = 12;
+const currentRound = ref(0);
const practiseResult = ref({});
-const power = ref(0);
+const power = ref(10);
const onReady = async () => {
await createPractiseAPI(total);
@@ -30,6 +33,10 @@ async function onReceiveMessage(content) {
messages.forEach((msg) => {
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
scores.value.push(msg.target);
+ currentRound.value += 1;
+ if (currentRound.value === 4) {
+ currentRound.value = 1;
+ }
power.value = msg.target.battery;
if (scores.value.length === total) {
showScore.value = true;
@@ -65,16 +72,18 @@ onUnmounted(() => {
:tips="`${
!start || scores.length === 12
? ''
- : `请开始射箭第${roundsName[Math.ceil((scores.length + 1) / 4)]}轮`
+ : `请开始射箭第${roundsName[Math.ceil((scores.length + 1) / 3)]}轮`
}`"
:start="start"
:total="120"
/>
+
+
+
+