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) => {
|
(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
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user