update:代码备份

This commit is contained in:
2026-05-18 11:05:13 +08:00
parent 21d8d0fbdb
commit 3ff11df1d7
2 changed files with 61 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const sound = ref(true);
const start = ref(false);
const scores = ref([]);
const total = 12;
@@ -89,6 +90,12 @@ function onAudioEnded(s) {
}
}
const updateSound = () => {
sound.value = !sound.value;
audioManager.setMuted(!sound.value);
};
onMounted(async () => {
// audioManager.play("第一轮");
uni.setKeepScreenOn({
@@ -134,10 +141,26 @@ onBeforeUnmount(() => {
<!-- <BowPower /> -->
</view>
<BowTarget
:totalRound="start ? total / 4 : 0"
:currentRound="scores.length % 3"
:scores="scores"
:totalRound="start ? total / 4 : 0"
:currentRound="scores.length % 3"
:scores="scores"
/>
<view class="sound-text-box">
<button class="sound-btn" hover-class="none" @click="updateSound">
<image
class="sound-icon"
:src="`/static/sound${sound ? '' : '-off'}-yellow.png`"
mode="aspectFit"
/>
</button>
<view class="bat-text-box">
<image
class="dao-icon"
src="/static/dao-icon.png"
mode="widthFix"
/>
</view>
</view>
<ScorePanel2 :arrows="scores" />
<ScoreResult
v-if="practiseResult.details"
@@ -196,4 +219,39 @@ onBeforeUnmount(() => {
transform: translateX(-50%);
bottom: -36rpx;
}
.sound-text-box{
height: 125rpx;
padding: 0 56rpx;
background: pink;
}
.sound-btn {
width: 76rpx;
height: 70rpx;
border: none;
display: flex;
align-items: center;
justify-content: center;
margin-left: 56rpx;
}
.sound-btn::after {
border: none;
}
.sound-icon {
width: 76rpx;
height: 70rpx;
}
.bat-bext-box{
flex: 1;
position: relative;
}
.dao-icon{
width: 160rpx;
height: 125rpx;
position: absolute;
left: 0;
bottom: 0;
}
</style>

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB