2025-08-15 11:23:23 +08:00
|
|
|
=
|
2025-05-16 15:56:54 +08:00
|
|
|
<script setup>
|
2025-11-07 16:28:52 +08:00
|
|
|
import { computed } from "vue";
|
2025-08-13 16:44:25 +08:00
|
|
|
import BowPower from "@/components/BowPower.vue";
|
|
|
|
|
import { RoundImages } from "@/constants";
|
2025-11-07 16:28:52 +08:00
|
|
|
const props = defineProps({
|
2025-06-06 00:34:54 +08:00
|
|
|
roundResults: {
|
2025-05-16 15:56:54 +08:00
|
|
|
type: Array,
|
|
|
|
|
default: () => [],
|
|
|
|
|
},
|
2025-06-08 20:59:41 +08:00
|
|
|
bluePoints: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
|
|
|
|
redPoints: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
2025-08-18 16:09:11 +08:00
|
|
|
goldenRound: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
2025-05-16 15:56:54 +08:00
|
|
|
});
|
2025-11-07 16:28:52 +08:00
|
|
|
|
|
|
|
|
const normalRounds = computed(
|
|
|
|
|
() => props.roundResults.length - props.goldenRound
|
|
|
|
|
);
|
2025-05-16 15:56:54 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<view class="container">
|
2025-08-13 16:44:25 +08:00
|
|
|
<view class="guide-row">
|
|
|
|
|
<image src="../static/shooter.png" mode="widthFix" />
|
2025-08-15 11:23:23 +08:00
|
|
|
<view
|
|
|
|
|
:style="{
|
|
|
|
|
marginBottom: '10px',
|
|
|
|
|
transform: 'scale(0.8) translateX(10px)',
|
|
|
|
|
}"
|
|
|
|
|
>
|
2025-10-29 17:26:27 +08:00
|
|
|
<BowPower />
|
2025-08-13 16:44:25 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-06-08 20:59:41 +08:00
|
|
|
<view>
|
|
|
|
|
<image src="../static/battle-header-melee.png" mode="widthFix" />
|
|
|
|
|
<text>蓝队({{ bluePoints }})</text>
|
|
|
|
|
<text>红队({{ redPoints }})</text>
|
|
|
|
|
</view>
|
2025-05-16 15:56:54 +08:00
|
|
|
<view class="players">
|
|
|
|
|
<view>
|
2025-06-06 00:34:54 +08:00
|
|
|
<view v-for="(result, index) in roundResults" :key="index">
|
2025-11-07 16:28:52 +08:00
|
|
|
<block v-if="index + 1 > normalRounds">
|
2025-08-18 16:09:11 +08:00
|
|
|
<image
|
2025-11-07 16:28:52 +08:00
|
|
|
:src="RoundImages[`gold${index + 1 - normalRounds}`]"
|
2025-08-18 16:09:11 +08:00
|
|
|
mode="widthFix"
|
|
|
|
|
/>
|
|
|
|
|
</block>
|
|
|
|
|
<block v-else>
|
|
|
|
|
<image :src="RoundImages[`round${index + 1}`]" mode="widthFix" />
|
|
|
|
|
</block>
|
2025-05-16 15:56:54 +08:00
|
|
|
<view>
|
2025-06-06 00:34:54 +08:00
|
|
|
<text>{{
|
2025-07-11 22:21:34 +08:00
|
|
|
result.blueArrows.length
|
|
|
|
|
? result.blueArrows
|
|
|
|
|
.map((item) => item.ring)
|
|
|
|
|
.reduce((last, next) => last + next, 0)
|
|
|
|
|
: ""
|
2025-06-06 00:34:54 +08:00
|
|
|
}}</text>
|
2025-05-16 15:56:54 +08:00
|
|
|
<text>环</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-07-25 09:59:54 +08:00
|
|
|
<block v-if="roundResults.length < 3">
|
2025-07-25 15:18:46 +08:00
|
|
|
<view v-for="i in 3 - roundResults.length" :key="i">
|
2025-08-15 11:23:23 +08:00
|
|
|
<image
|
|
|
|
|
:src="RoundImages[`round${i + roundResults.length}`]"
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
/>
|
2025-07-25 15:18:46 +08:00
|
|
|
<view>
|
2025-08-15 11:23:23 +08:00
|
|
|
<text></text>
|
2025-07-25 15:18:46 +08:00
|
|
|
<text>环</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-07-25 09:59:54 +08:00
|
|
|
</block>
|
2025-05-16 15:56:54 +08:00
|
|
|
</view>
|
|
|
|
|
<view>
|
2025-06-06 00:34:54 +08:00
|
|
|
<view v-for="(result, index) in roundResults" :key="index">
|
2025-11-07 16:28:52 +08:00
|
|
|
<block v-if="index + 1 > normalRounds">
|
2025-08-18 16:09:11 +08:00
|
|
|
<image
|
2025-11-07 16:28:52 +08:00
|
|
|
:src="RoundImages[`gold${index + 1 - normalRounds}`]"
|
2025-08-18 16:09:11 +08:00
|
|
|
mode="widthFix"
|
|
|
|
|
/>
|
|
|
|
|
</block>
|
|
|
|
|
<block v-else>
|
|
|
|
|
<image :src="RoundImages[`round${index + 1}`]" mode="widthFix" />
|
|
|
|
|
</block>
|
2025-05-16 15:56:54 +08:00
|
|
|
<view>
|
2025-06-08 20:59:41 +08:00
|
|
|
<text>{{
|
2025-07-11 22:21:34 +08:00
|
|
|
result.redArrows.length
|
|
|
|
|
? result.redArrows
|
|
|
|
|
.map((item) => item.ring)
|
|
|
|
|
.reduce((last, next) => last + next, 0)
|
|
|
|
|
: ""
|
2025-06-08 20:59:41 +08:00
|
|
|
}}</text>
|
2025-05-16 15:56:54 +08:00
|
|
|
<text>环</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-07-25 09:59:54 +08:00
|
|
|
<block v-if="roundResults.length < 3">
|
2025-07-25 15:18:46 +08:00
|
|
|
<view v-for="i in 3 - roundResults.length" :key="i">
|
2025-08-15 11:23:23 +08:00
|
|
|
<image
|
|
|
|
|
:src="RoundImages[`round${i + roundResults.length}`]"
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
/>
|
2025-07-25 15:18:46 +08:00
|
|
|
<view>
|
|
|
|
|
<text></text>
|
|
|
|
|
<text>环</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-07-25 09:59:54 +08:00
|
|
|
</block>
|
2025-05-16 15:56:54 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.container {
|
|
|
|
|
width: 100%;
|
2025-06-26 22:54:17 +08:00
|
|
|
overflow: hidden;
|
2025-08-13 16:44:25 +08:00
|
|
|
margin-top: -40px;
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.container > view:nth-child(2) {
|
2025-06-08 20:59:41 +08:00
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.container > view:nth-child(2) > image:first-child {
|
2025-05-16 15:56:54 +08:00
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
2025-06-08 20:59:41 +08:00
|
|
|
top: -6px;
|
|
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.container > view:nth-child(2) > text {
|
2025-06-08 20:59:41 +08:00
|
|
|
z-index: 1;
|
|
|
|
|
margin-top: 2px;
|
2025-11-07 16:28:52 +08:00
|
|
|
color: #8a323e;
|
2025-11-06 14:15:53 +08:00
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
.container > view:nth-child(2) > text:nth-child(2) {
|
|
|
|
|
color: #004ac1;
|
2025-06-08 20:59:41 +08:00
|
|
|
}
|
2025-05-16 15:56:54 +08:00
|
|
|
.players {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
.players > view {
|
|
|
|
|
width: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
color: #fff;
|
2025-06-08 20:59:41 +08:00
|
|
|
padding-top: 5px;
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.players > view:first-child > view {
|
|
|
|
|
background: linear-gradient(270deg, #172a86 0%, #0006 100%);
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.players > view:last-child > view {
|
|
|
|
|
background: linear-gradient(270deg, #0006 0%, #6a1212 100%);
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
|
|
|
|
.players > view > view {
|
2025-08-13 16:44:25 +08:00
|
|
|
min-height: 25px;
|
|
|
|
|
width: calc(100% - 40px);
|
|
|
|
|
padding: 2px 20px;
|
2025-05-16 15:56:54 +08:00
|
|
|
margin-bottom: 5px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.players > view > view > image:first-child {
|
|
|
|
|
width: 72px;
|
2025-08-20 16:04:17 +08:00
|
|
|
height: 20px;
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
|
|
|
|
.players > view > view > view:last-child {
|
2025-08-13 16:44:25 +08:00
|
|
|
font-size: 10px;
|
2025-05-16 15:56:54 +08:00
|
|
|
}
|
|
|
|
|
.players > view > view > view:last-child > text:first-child {
|
2025-08-13 16:44:25 +08:00
|
|
|
font-size: 16px;
|
2025-05-16 15:56:54 +08:00
|
|
|
color: #fed847;
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
}
|
2025-08-13 16:44:25 +08:00
|
|
|
.guide-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
padding: 0 5vw;
|
|
|
|
|
margin-bottom: -4px;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.guide-row > image {
|
|
|
|
|
width: 18%;
|
|
|
|
|
}
|
2025-05-16 15:56:54 +08:00
|
|
|
</style>
|