李志伟 3 years ago
parent
commit
113510c04e
2 changed files with 46 additions and 20 deletions
  1. 7
    5
      src/components/imgbox.vue
  2. 39
    15
      src/pages/Honghe.vue

+ 7
- 5
src/components/imgbox.vue View File

17
       type: Object,
17
       type: Object,
18
       default: () => ({})
18
       default: () => ({})
19
     },
19
     },
20
-    mode: {
21
-      type: String,
22
-      default: '1'
23
-    }
24
   },
20
   },
25
   data() {
21
   data() {
26
     return {
22
     return {
29
       classList: ["card"],
25
       classList: ["card"],
30
       fristFontImg:undefined,
26
       fristFontImg:undefined,
31
       nowFontImg: require('../assets/popupImg/backImag.jpg'),
27
       nowFontImg: require('../assets/popupImg/backImag.jpg'),
32
-      nowBackImg: require('../assets/popupImg/popuBody.jpg'),
28
+      // nowBackImg: require('../assets/popupImg/popuBody.jpg'),
33
       openImg: require('../assets/popupImg/redBack.jpg'),
29
       openImg: require('../assets/popupImg/redBack.jpg'),
34
       isFrist:true,
30
       isFrist:true,
35
     };
31
     };
37
   computed: {
33
   computed: {
38
     poster() {
34
     poster() {
39
       return this.mode === 1 ? this.nowFontImg : '';
35
       return this.mode === 1 ? this.nowFontImg : '';
36
+    },    
37
+    mode() {
38
+      return this.prize.mode;
39
+    },
40
+    nowBackImg() {
41
+      return this.mode === 3 ? require('../assets/popupImg/popuBody.jpg') : '';
40
     }
42
     }
41
   },
43
   },
42
 };
44
 };

+ 39
- 15
src/pages/Honghe.vue View File

13
       <div class="outer6 flex-col">
13
       <div class="outer6 flex-col">
14
         <div v-for="month in list" :key="month.id" class="section-item">
14
         <div v-for="month in list" :key="month.id" class="section-item">
15
           <div @click="handleMonthClick(month)">
15
           <div @click="handleMonthClick(month)">
16
+            <ImgBox :prize="month"></ImgBox>
16
             <!-- <img class="section-item-image" src="../assets/coverIndex.jpg" /> -->
17
             <!-- <img class="section-item-image" src="../assets/coverIndex.jpg" /> -->
17
-            <img
18
+            <!-- <img
18
               :class="`section-item-image ${rotateY?'backImag':''}` "
19
               :class="`section-item-image ${rotateY?'backImag':''}` "
19
               src="../assets/popupImg/backImag.jpg"
20
               src="../assets/popupImg/backImag.jpg"
20
-            />
21
-          </div> -->
21
+            /> -->
22
+          </div>
22
         </div>
23
         </div>
23
       </div>
24
       </div>
24
     </div>
25
     </div>
39
     popImg: '',
40
     popImg: '',
40
     shareImg: '',
41
     shareImg: '',
41
     screenImg: '',
42
     screenImg: '',
42
-    calendarImg: ''
43
+    calendarImg: '',
44
+    mode: 1
43
   },
45
   },
44
   {
46
   {
45
     id: 2,
47
     id: 2,
47
     popImg: '',
49
     popImg: '',
48
     shareImg: '',
50
     shareImg: '',
49
     screenImg: '',
51
     screenImg: '',
50
-    calendarImg: ''
52
+    calendarImg: '',
53
+    mode: 1
51
   },
54
   },
52
   {
55
   {
53
     id: 3,
56
     id: 3,
55
     popImg: '',
58
     popImg: '',
56
     shareImg: '',
59
     shareImg: '',
57
     screenImg: '',
60
     screenImg: '',
58
-    calendarImg: ''
61
+    calendarImg: '',
62
+    mode: 1
59
   },
63
   },
60
   {
64
   {
61
     id: 4,
65
     id: 4,
63
     popImg: '',
67
     popImg: '',
64
     shareImg: '',
68
     shareImg: '',
65
     screenImg: '',
69
     screenImg: '',
66
-    calendarImg: ''
70
+    calendarImg: '',
71
+    mode: 1
67
   },
72
   },
68
   {
73
   {
69
     id: 5,
74
     id: 5,
71
     popImg: '',
76
     popImg: '',
72
     shareImg: '',
77
     shareImg: '',
73
     screenImg: '',
78
     screenImg: '',
74
-    calendarImg: ''
79
+    calendarImg: '',
80
+    mode: 1
75
   },
81
   },
76
   {
82
   {
77
     id: 6,
83
     id: 6,
79
     popImg: '',
85
     popImg: '',
80
     shareImg: '',
86
     shareImg: '',
81
     screenImg: '',
87
     screenImg: '',
82
-    calendarImg: ''
88
+    calendarImg: '',
89
+    mode: 1
83
   },
90
   },
84
   {
91
   {
85
     id: 7,
92
     id: 7,
87
     popImg: '',
94
     popImg: '',
88
     shareImg: '',
95
     shareImg: '',
89
     screenImg: '',
96
     screenImg: '',
90
-    calendarImg: ''
97
+    calendarImg: '',
98
+    mode: 1
91
   },
99
   },
92
   {
100
   {
93
     id: 8,
101
     id: 8,
95
     popImg: '',
103
     popImg: '',
96
     shareImg: '',
104
     shareImg: '',
97
     screenImg: '',
105
     screenImg: '',
98
-    calendarImg: ''
106
+    calendarImg: '',
107
+    mode: 1
99
   },
108
   },
100
   {
109
   {
101
     id: 9,
110
     id: 9,
103
     popImg: '',
112
     popImg: '',
104
     shareImg: '',
113
     shareImg: '',
105
     screenImg: '',
114
     screenImg: '',
106
-    calendarImg: ''
115
+    calendarImg: '',
116
+    mode: 1
107
   },
117
   },
108
   {
118
   {
109
     id: 10,
119
     id: 10,
111
     popImg: '',
121
     popImg: '',
112
     shareImg: '',
122
     shareImg: '',
113
     screenImg: '',
123
     screenImg: '',
114
-    calendarImg: ''
124
+    calendarImg: '',
125
+    mode: 1
115
   },
126
   },
116
   {
127
   {
117
     id: 11,
128
     id: 11,
119
     popImg: '',
130
     popImg: '',
120
     shareImg: '',
131
     shareImg: '',
121
     screenImg: '',
132
     screenImg: '',
122
-    calendarImg: ''
133
+    calendarImg: '',
134
+    mode: 1
123
   },
135
   },
124
   {
136
   {
125
     id: 12,
137
     id: 12,
127
     popImg: '',
139
     popImg: '',
128
     shareImg: '',
140
     shareImg: '',
129
     screenImg: '',
141
     screenImg: '',
130
-    calendarImg: ''
142
+    calendarImg: '',
143
+    mode: 1
131
   }
144
   }
132
 ]
145
 ]
133
 
146
 
136
   components: {
149
   components: {
137
     Popup: () => import('@/components/Popup.vue'),
150
     Popup: () => import('@/components/Popup.vue'),
138
     MyWinning: () => import('@/components/MyWinning.vue'),
151
     MyWinning: () => import('@/components/MyWinning.vue'),
152
+    ImgBox: () => import('@/components/imgbox.vue')
139
   },
153
   },
140
   data() {
154
   data() {
141
     return {
155
     return {
164
     //关闭
178
     //关闭
165
     cancelFrom() {
179
     cancelFrom() {
166
       this.showPopup = false
180
       this.showPopup = false
181
+      this.list.map((item) => {
182
+        if (item.id == this.currentMonth.id) {
183
+          item.mode=3
184
+        }
185
+      })
167
     },
186
     },
168
     handleMonthClick(month) {
187
     handleMonthClick(month) {
188
+      this.list.map((item) => {
189
+        if (item.id == month.id) {
190
+          item.mode=2
191
+        }
192
+      })
169
       this.currentMonth = month
193
       this.currentMonth = month
170
 
194
 
171
       // 如果点击可以抽奖
195
       // 如果点击可以抽奖