Browse Source

12次就不能再次转动

hxl
Administrator 4 weeks ago
parent
commit
55d387f4a1
  1. 11
      src/views/DZP1.vue
  2. 2
      src/views/DZP2.vue

11
src/views/DZP1.vue

@ -7,6 +7,9 @@ const showPopup = ref(false);
const popupMessage = ref(''); const popupMessage = ref('');
const totalScore = ref(4000) // const totalScore = ref(4000) //
const myLucky = ref() const myLucky = ref()
//
const spinCount = ref(0)
const isSpinning = ref(false)
// //
//const baseScore = 4000 //const baseScore = 4000
const wheelConfig = ref({ const wheelConfig = ref({
@ -40,6 +43,14 @@ const customOrder = ref([0, 4, 3, 1, 2, 4, 5, 7, 3, 4, 0])
let orderIndex = 0; let orderIndex = 0;
function startCallback() { function startCallback() {
//
if (spinCount.value >= 11) { // 01112
alert('已达最大转动次数!')
return
}
isSpinning.value = true
spinCount.value++
// //
//totalScore.value = baseScore //totalScore.value = baseScore
// play // play

2
src/views/DZP2.vue

@ -143,7 +143,7 @@ function endCallback(prize) {
} }
.full-background { .full-background {
background-image: url('/public/bg2.jpg');
background-image: url('/public/bg2.png');
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;

Loading…
Cancel
Save