fix bug
This commit is contained in:
13
src/apis.js
13
src/apis.js
@@ -295,17 +295,16 @@ export const getGameAPI = async (battleId) => {
|
||||
};
|
||||
});
|
||||
});
|
||||
const totalRounds = Object.keys(data.roundsData).length;
|
||||
(goldenRoundRecords || []).forEach((item, index) => {
|
||||
item.arrowHistory.forEach((arrow) => {
|
||||
if (!data.roundsData[playerStats.length + index + 1]) {
|
||||
data.roundsData[playerStats.length + index + 1] = {};
|
||||
if (!data.roundsData[totalRounds + index + 1]) {
|
||||
data.roundsData[totalRounds + index + 1] = {};
|
||||
}
|
||||
if (!data.roundsData[playerStats.length + index + 1][arrow.playerId]) {
|
||||
data.roundsData[playerStats.length + index + 1][arrow.playerId] = [];
|
||||
if (!data.roundsData[totalRounds + index + 1][arrow.playerId]) {
|
||||
data.roundsData[totalRounds + index + 1][arrow.playerId] = [];
|
||||
}
|
||||
data.roundsData[playerStats.length + index + 1][arrow.playerId].push(
|
||||
arrow
|
||||
);
|
||||
data.roundsData[totalRounds + index + 1][arrow.playerId].push(arrow);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -212,7 +212,9 @@ onMounted(() => {
|
||||
}
|
||||
.target {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
width: calc(100% - 20px);
|
||||
height: calc(100% - 20px);
|
||||
}
|
||||
.e-value {
|
||||
position: absolute;
|
||||
@@ -244,6 +246,7 @@ onMounted(() => {
|
||||
}
|
||||
.target > image:last-child {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.hit {
|
||||
position: absolute;
|
||||
@@ -261,6 +264,7 @@ onMounted(() => {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* transform: translate(-50%, -50%); */
|
||||
}
|
||||
.hit > text {
|
||||
transform: scaleX(0.7) translateY(-0.5px);
|
||||
|
||||
@@ -18,7 +18,7 @@ const data = ref({
|
||||
onLoad(async (options) => {
|
||||
if (options.battleId) {
|
||||
const result = await getGameAPI(
|
||||
options.battleId || "BATTLE-1755484626207409508-955"
|
||||
options.battleId || "BATTLE-1756453741433684760-512"
|
||||
);
|
||||
data.value = result;
|
||||
Object.values(result.bluePlayers).forEach((p, index) => {
|
||||
@@ -150,6 +150,7 @@ const onClickTab = (index) => {
|
||||
</view>
|
||||
<view
|
||||
v-if="
|
||||
selected > 0 &&
|
||||
selected >= data.goldenRounds.length &&
|
||||
selected <= data.goldenRounds.length
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user