This commit is contained in:
kron
2025-09-10 15:56:57 +08:00
parent 65548e6c6a
commit eca11715d5
3 changed files with 13 additions and 9 deletions

View File

@@ -295,17 +295,16 @@ export const getGameAPI = async (battleId) => {
}; };
}); });
}); });
const totalRounds = Object.keys(data.roundsData).length;
(goldenRoundRecords || []).forEach((item, index) => { (goldenRoundRecords || []).forEach((item, index) => {
item.arrowHistory.forEach((arrow) => { item.arrowHistory.forEach((arrow) => {
if (!data.roundsData[playerStats.length + index + 1]) { if (!data.roundsData[totalRounds + index + 1]) {
data.roundsData[playerStats.length + index + 1] = {}; data.roundsData[totalRounds + index + 1] = {};
} }
if (!data.roundsData[playerStats.length + index + 1][arrow.playerId]) { if (!data.roundsData[totalRounds + index + 1][arrow.playerId]) {
data.roundsData[playerStats.length + index + 1][arrow.playerId] = []; data.roundsData[totalRounds + index + 1][arrow.playerId] = [];
} }
data.roundsData[playerStats.length + index + 1][arrow.playerId].push( data.roundsData[totalRounds + index + 1][arrow.playerId].push(arrow);
arrow
);
}); });
}); });

View File

@@ -212,7 +212,9 @@ onMounted(() => {
} }
.target { .target {
position: relative; position: relative;
padding: 10px; margin: 10px;
width: calc(100% - 20px);
height: calc(100% - 20px);
} }
.e-value { .e-value {
position: absolute; position: absolute;
@@ -244,6 +246,7 @@ onMounted(() => {
} }
.target > image:last-child { .target > image:last-child {
width: 100%; width: 100%;
height: 100%;
} }
.hit { .hit {
position: absolute; position: absolute;
@@ -261,6 +264,7 @@ onMounted(() => {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
/* transform: translate(-50%, -50%); */
} }
.hit > text { .hit > text {
transform: scaleX(0.7) translateY(-0.5px); transform: scaleX(0.7) translateY(-0.5px);

View File

@@ -18,7 +18,7 @@ const data = ref({
onLoad(async (options) => { onLoad(async (options) => {
if (options.battleId) { if (options.battleId) {
const result = await getGameAPI( const result = await getGameAPI(
options.battleId || "BATTLE-1755484626207409508-955" options.battleId || "BATTLE-1756453741433684760-512"
); );
data.value = result; data.value = result;
Object.values(result.bluePlayers).forEach((p, index) => { Object.values(result.bluePlayers).forEach((p, index) => {
@@ -150,6 +150,7 @@ const onClickTab = (index) => {
</view> </view>
<view <view
v-if=" v-if="
selected > 0 &&
selected >= data.goldenRounds.length && selected >= data.goldenRounds.length &&
selected <= data.goldenRounds.length selected <= data.goldenRounds.length
" "