BUG修复
This commit is contained in:
@@ -121,7 +121,7 @@ onUnmounted(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin-top: -27vw;
|
margin-top: -40vw;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.debug-text {
|
.debug-text {
|
||||||
|
|||||||
@@ -47,15 +47,8 @@ onMounted(async () => {
|
|||||||
rank.value =
|
rank.value =
|
||||||
battleInfo.playerStats.findIndex((p) => p.id === user.value.id) + 1;
|
battleInfo.playerStats.findIndex((p) => p.id === user.value.id) + 1;
|
||||||
if (mine) {
|
if (mine) {
|
||||||
if (battleInfo.mode === 1) {
|
totalPoints.value = mine.totalScore;
|
||||||
totalPoints.value = mine.roundStats.reduce(
|
ifWin.value = battleInfo.mode === 1 && mine.team === battleInfo.winner;
|
||||||
(last, next) => last + next.arrows.length,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if (mine.team === battleInfo.winner) ifWin.value = true;
|
|
||||||
} else if (battleInfo.mode === 2) {
|
|
||||||
totalPoints.value = mine.totalScore;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// const result = await getHomeData();
|
// const result = await getHomeData();
|
||||||
// if (result.user) updateUser(result.user);
|
// if (result.user) updateUser(result.user);
|
||||||
|
|||||||
@@ -320,10 +320,11 @@ async function onReceiveMessage(messages = []) {
|
|||||||
tips.value = "请在90秒内射完12支箭";
|
tips.value = "请在90秒内射完12支箭";
|
||||||
seq.value += 1;
|
seq.value += 1;
|
||||||
}
|
}
|
||||||
roundResults.value.push({
|
if (!roundResults.value.length)
|
||||||
redArrows: [],
|
roundResults.value.push({
|
||||||
blueArrows: [],
|
redArrows: [],
|
||||||
});
|
blueArrows: [],
|
||||||
|
});
|
||||||
total.value = 15;
|
total.value = 15;
|
||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
if (msg.constructor === MESSAGETYPES.MeleeAllReady) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ onLoad(async (options) => {
|
|||||||
:style="{
|
:style="{
|
||||||
width: `${Math.max(100 / data.players.length, 18)}vw`,
|
width: `${Math.max(100 / data.players.length, 18)}vw`,
|
||||||
}"
|
}"
|
||||||
mode="aspectFill"
|
mode="widthFix"
|
||||||
class="player-bg"
|
class="player-bg"
|
||||||
/>
|
/>
|
||||||
<Avatar
|
<Avatar
|
||||||
@@ -93,11 +93,8 @@ onLoad(async (options) => {
|
|||||||
}
|
}
|
||||||
.players {
|
.players {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 85px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
|
||||||
background-color: #fff3;
|
|
||||||
}
|
}
|
||||||
.players::-webkit-scrollbar {
|
.players::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
@@ -105,21 +102,25 @@ onLoad(async (options) => {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
.players > view {
|
.players > view {
|
||||||
|
background-color: #fff3;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding-top: 5px;
|
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
height: 68px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
.player-bg {
|
.player-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
.players > view > text {
|
.players > view > text {
|
||||||
margin-top: 5px;
|
margin: 5px 0;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -145,10 +145,12 @@ async function onReceiveMessage(messages = []) {
|
|||||||
timerSeq.value = 0;
|
timerSeq.value = 0;
|
||||||
scores.value = [];
|
scores.value = [];
|
||||||
totalRounds.value = msg.groupUserStatus.config.maxRounds;
|
totalRounds.value = msg.groupUserStatus.config.maxRounds;
|
||||||
roundResults.value.push({
|
// 返回游戏时候会加上,加了就不用再加了
|
||||||
redArrows: [],
|
if (!roundResults.value.length)
|
||||||
blueArrows: [],
|
roundResults.value.push({
|
||||||
});
|
redArrows: [],
|
||||||
|
blueArrows: [],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
if (msg.constructor === MESSAGETYPES.ToSomeoneShoot) {
|
||||||
if (currentShooterId.value !== msg.userId) {
|
if (currentShooterId.value !== msg.userId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user