|
@@ -1,6 +1,6 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="index-box">
|
3
|
|
- <popup :show="showPopup" @cancel="cancelFrom" />
|
|
3
|
+ <popup :show="showPopup" @cancel="cancelFrom" :current-month="currentMonth" />
|
4
|
4
|
<div>
|
5
|
5
|
<div>
|
6
|
6
|
<img class="topImage" src="../assets/hareTop.png" alt />
|
|
@@ -8,8 +8,8 @@
|
8
|
8
|
</div>
|
9
|
9
|
<div class="outer6-wrapper">
|
10
|
10
|
<div class="outer6 flex-col">
|
11
|
|
- <div v-for="item in indexJPG" :key="item" class="section-item">
|
12
|
|
- <div @click="baga">
|
|
11
|
+ <div v-for="month in list" :key="month.id" class="section-item">
|
|
12
|
+ <div @click="handleMonthClick(month)">
|
13
|
13
|
<!-- <img class="section-item-image" src="../assets/coverIndex.jpg" /> -->
|
14
|
14
|
<img
|
15
|
15
|
:class="`section-item-image ${!showPopup?'backImag':''}` "
|
|
@@ -25,7 +25,23 @@
|
25
|
25
|
<script>
|
26
|
26
|
import { useModel } from '@/store'
|
27
|
27
|
import { drawLottery, getPrizeList } from '@/services/person'
|
28
|
|
-import { rand } from '@/utils/math'
|
|
28
|
+import { rand, shuffle } from '@/utils/math'
|
|
29
|
+
|
|
30
|
+// 月份信息
|
|
31
|
+const monthList = [
|
|
32
|
+ { id: 1, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
33
|
+ { id: 2, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
34
|
+ { id: 3, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
35
|
+ { id: 4, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
36
|
+ { id: 5, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
37
|
+ { id: 6, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
38
|
+ { id: 7, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
39
|
+ { id: 8, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
40
|
+ { id: 9, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
41
|
+ { id: 10, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
42
|
+ { id: 11, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
43
|
+ { id: 12, posterImg: '', popImg: '', shareImg: '', screenImg: '', calendarImg: '' },
|
|
44
|
+]
|
29
|
45
|
|
30
|
46
|
export default {
|
31
|
47
|
name: 'Honghe',
|
|
@@ -34,7 +50,8 @@ export default {
|
34
|
50
|
},
|
35
|
51
|
data() {
|
36
|
52
|
return {
|
37
|
|
- indexJPG: new Array(12).fill(null),
|
|
53
|
+ list: shuffle(monthList),
|
|
54
|
+ currentMonth: null,
|
38
|
55
|
showPopup: false,
|
39
|
56
|
prizeList: [],
|
40
|
57
|
clickNum: 0,
|
|
@@ -59,9 +76,8 @@ export default {
|
59
|
76
|
cancelFrom() {
|
60
|
77
|
this.showPopup = false
|
61
|
78
|
},
|
62
|
|
- baga(e) {
|
63
|
|
- console.log(e)
|
64
|
|
- this.showPopup = true
|
|
79
|
+ handleMonthClick(month) {
|
|
80
|
+ this.currentMonth = month
|
65
|
81
|
|
66
|
82
|
// 如果点击可以抽奖
|
67
|
83
|
if (this.clickNum === this.bingoClickNum) {
|
|
@@ -71,8 +87,12 @@ export default {
|
71
|
87
|
// 如果还没有参与
|
72
|
88
|
if (!this.person.isJoined) {
|
73
|
89
|
this.drawLots()
|
|
90
|
+ } else {
|
|
91
|
+ this.showPopup = true
|
74
|
92
|
}
|
75
|
93
|
}
|
|
94
|
+ } else {
|
|
95
|
+ this.showPopup = true
|
76
|
96
|
}
|
77
|
97
|
|
78
|
98
|
if (this.clickNum < this.bingoClickNum) {
|