From 55d387f4a1ac3b0585395e23f46b1ed78d9353cf Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 21 Apr 2025 10:39:36 +0800 Subject: [PATCH] =?UTF-8?q?12=E6=AC=A1=E5=B0=B1=E4=B8=8D=E8=83=BD=E5=86=8D?= =?UTF-8?q?=E6=AC=A1=E8=BD=AC=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/DZP1.vue | 11 +++++++++++ src/views/DZP2.vue | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/DZP1.vue b/src/views/DZP1.vue index 8246d50..1e519b5 100644 --- a/src/views/DZP1.vue +++ b/src/views/DZP1.vue @@ -7,6 +7,9 @@ const showPopup = ref(false); const popupMessage = ref(''); const totalScore = ref(4000) // 初始分数 const myLucky = ref() +// 新增状态 +const spinCount = ref(0) +const isSpinning = ref(false) // 新增变量记录基础分数 //const baseScore = 4000 const wheelConfig = ref({ @@ -40,6 +43,14 @@ const customOrder = ref([0, 4, 3, 1, 2, 4, 5, 7, 3, 4, 0]) let orderIndex = 0; function startCallback() { + // 检查转动条件和次数 + if (spinCount.value >= 11) { // 从0开始计数,11表示第12次 + alert('已达最大转动次数!') + return + } + + isSpinning.value = true + spinCount.value++ // 重置为初始分数 //totalScore.value = baseScore // 调用抽奖组件的play方法开始游戏 diff --git a/src/views/DZP2.vue b/src/views/DZP2.vue index 9b6e964..fc32657 100644 --- a/src/views/DZP2.vue +++ b/src/views/DZP2.vue @@ -143,7 +143,7 @@ function endCallback(prize) { } .full-background { - background-image: url('/public/bg2.jpg'); + background-image: url('/public/bg2.png'); background-size: cover; background-repeat: no-repeat; background-position: center;