细节修改

This commit is contained in:
kron
2025-07-16 14:42:00 +08:00
parent c1fa8b9469
commit 77dca00ce7
7 changed files with 41 additions and 15 deletions

View File

@@ -87,7 +87,7 @@ async function onReceiveMessage(messages = []) {
user.value,
practiseResult.value
);
}, 2000);
}, 1500);
}
}
});

View File

@@ -39,12 +39,19 @@ onLoad(async (options) => {
:key="index"
:style="{
width: `${Math.max(100 / data.players.length, 18)}vw`,
backgroundColor:
player.playerId === currentUser.playerId ? '#aba57a' : '',
color: player.playerId === currentUser.playerId ? '#000' : '#fff9',
}"
@click="() => onSelect(player.playerId)"
>
<image
v-if="player.playerId === currentUser.playerId"
src="../static/player-bg2.png"
:style="{
width: `${Math.max(100 / data.players.length, 18)}vw`,
}"
mode="aspectFill"
class="player-bg"
/>
<Avatar
:src="player.avatar"
:size="40"
@@ -89,8 +96,14 @@ onLoad(async (options) => {
height: 85px;
width: 100%;
overflow-x: auto;
overflow-y: hidden;
background-color: #fff3;
}
.players::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.players > view {
display: flex;
flex-direction: column;
@@ -99,6 +112,11 @@ onLoad(async (options) => {
font-size: 12px;
padding-top: 5px;
flex: 0 0 auto;
position: relative;
}
.player-bg {
position: absolute;
width: 100%;
}
.players > view > text {
margin-top: 5px;
@@ -107,6 +125,7 @@ onLoad(async (options) => {
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
position: relative;
}
.score-text {
width: 100%;

View File

@@ -58,12 +58,19 @@ async function onReceiveMessage(messages = []) {
}
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
if (practiseId.value && practiseId.value === msg.practice.id) {
start.value = false;
practiseResult.value = {
...msg.practice,
arrows: JSON.parse(msg.practice.arrows),
};
generateCanvasImage("shareCanvas", 2, user.value, practiseResult.value);
setTimeout(() => {
start.value = false;
practiseResult.value = {
...msg.practice,
arrows: JSON.parse(msg.practice.arrows),
};
generateCanvasImage(
"shareCanvas",
2,
user.value,
practiseResult.value
);
}, 1500);
}
}
});
@@ -101,8 +108,8 @@ onUnmounted(() => {
<template>
<Container :bgType="1" title="个人单组练习">
<view>
<TestDistance v-if="!start && !practiseResult.arrows" />
<block v-if="start || practiseResult.arrows">
<TestDistance v-if="!practiseId" />
<block v-if="practiseId">
<ShootProgress
:tips="`${
!start || scores.length === 12

View File

@@ -64,7 +64,7 @@ async function onReceiveMessage(messages = []) {
user.value,
practiseResult.value
);
}, 2000);
}, 1500);
}
}
});
@@ -101,8 +101,8 @@ onUnmounted(() => {
<template>
<Container :bgType="1" title="日常耐力挑战">
<view>
<TestDistance v-if="!start && !practiseResult.arrows" />
<block v-if="start || practiseResult.arrows">
<TestDistance v-if="!practiseId" />
<block v-if="practiseId">
<ShootProgress
:start="start"
:tips="`请连续射击${total}支箭`"