Ver código fonte

Merge branch 'master' of http://git.ycjcjy.com/honghe/h5-draw-lots into master

张延森 3 anos atrás
pai
commit
eb63601f30

+ 8
- 10
src/components/CalendarPoster.vue Ver arquivo

@@ -222,21 +222,20 @@ export default {
222 222
       padding-bottom: 33px;
223 223
       align-items: center;
224 224
       .block1 {
225
-        width: 180px;
226 225
         height: 113px;
227 226
         .section1 {
228
-          height: 84px;
227
+          height: 75.6px;
229 228
           border-radius: 8px;
230 229
           background-size: 100% auto;
231 230
           background-color: #fff;
232
-          width: 180px;
231
+          width: 162px;
233 232
           justify-content: center;
234 233
           align-items: center;
235 234
           border: 0;
236 235
         }
237 236
         .info2 {
238
-          width: 156px;
239
-          height: 60px;
237
+          width: 140.4px;
238
+          height: 54px;
240 239
           display: block;
241 240
           color: #fff;
242 241
           text-align: center;
@@ -281,20 +280,19 @@ export default {
281 280
         .txt1 {
282 281
           background-size: 100% auto;
283 282
           background-repeat: no-repeat;
284
-          width: 160px;
285
-          height: 48px;
283
+          width: 152.1px;
284
+          height: 43.2px;
286 285
           margin-bottom: 80px;
287 286
         }
288 287
       }
289 288
 
290 289
       .main5-month {
291
-        // background-size: 100% 100%;
292 290
         background-position: 50% 50%;
293 291
         background-repeat: no-repeat;
294
-        height: 48px;
292
+        height: 43.2px;
295 293
         border-radius: 8px;
296 294
         margin-top: 11px;
297
-        width: 343px;
295
+        width: 308.7px;
298 296
         background-color: #b02c32;
299 297
         border: 0;
300 298
         position: fixed;

+ 17
- 87
src/components/MyWinning.vue Ver arquivo

@@ -1,20 +1,13 @@
1 1
 <template>
2 2
   <div v-if="show" class="dialog-my">
3 3
     <div style=" height:100vh; width:100%;">
4
-      <!-- 弹窗 -->
5
-      <!-- <ShaerPopup :show="shaerShow" @closeMyself="cancelPopup" /> -->
6
-      <!-- 弹窗 -->
7
-
8
-      <!-- <router-link :to="{path:'/'}"> -->
9 4
       <div
10 5
         class="backhome"
11 6
         :style="`background:url('${backimg}');background-size: 100% auto;`"
12 7
         @click="cancelPopupts"
13 8
       ></div>
14
-      <!-- </router-link> -->
15
-
16 9
       <div>
17
-        <div v-if="PrizeState===0">
10
+        <div v-if="Prize!=undefined">
18 11
           <!-- 领取屏保 -->
19 12
           <div class="outer3 flex-col">
20 13
             <div class="haibao">
@@ -28,20 +21,22 @@
28 21
           </div>
29 22
         </div>
30 23
         <div v-else style="overflow: auto;height:100vh;">
31
-          <!-- 挂历 -->
24
+          <div class="page flex-col">
25
+            <div class="group1 flex-col">
26
+              <div class="wrap3 flex-col">
27
+                <img src="../assets/prizeImg/notPrize.jpg" class="subhaibao" />
28
+                <!-- 没有奖品 -->
29
+              </div>
30
+            </div>
31
+          </div>
32
+        </div>
33
+        <div v-if="PrizeState===2" style="overflow: auto;height:100vh;">
32 34
           <div class="page flex-col">
33 35
             <div class="group1 flex-col">
34 36
               <div class="wrap3 flex-col">
35 37
                 <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
38
+                <!-- 活动结束 -->
36 39
               </div>
37
-              <!-- <div class="wrap5 flex-col">
38
-                <span class="txt1" :style="`background-image: url(${pressLucky});`"></span>
39
-                <div
40
-                  class="main5 flex-col"
41
-                  :style="`background-image: url(${shaerButRed});`"
42
-                  @click="()=>{this.shaerShow=true}"
43
-                ></div>
44
-              </div>-->
45 40
             </div>
46 41
           </div>
47 42
         </div>
@@ -78,6 +73,7 @@ export default {
78 73
     },
79 74
     Prize: {
80 75
       type: Object
76
+      // default: () => ({})
81 77
     }
82 78
   },
83 79
 
@@ -94,7 +90,10 @@ export default {
94 90
 
95 91
   watch: {
96 92
     stater(val, res) {
97
-      console.log('🚀 ~ file: CalendarPoster.vue ~ line 98 ~ stater ~ res', res)
93
+      console.log(
94
+        '🚀 ~ file: CalendarPoster.vue ~ line 98 ~ stater ~ res',
95
+        this.Prize
96
+      )
98 97
     },
99 98
     created() {
100 99
       // this.showSelf = this.show
@@ -112,7 +111,6 @@ export default {
112 111
     /** 取消按钮操作 */
113 112
     cancelPopupts() {
114 113
       // this.shaerShow = false
115
-      // console.log(22222222222222222222222)
116 114
       this.$emit('cancelPopus', true)
117 115
     },
118 116
 
@@ -221,45 +219,6 @@ export default {
221 219
         }
222 220
       }
223 221
     }
224
-
225
-    .mod2 {
226
-      z-index: 35;
227
-      height: 210px;
228
-      background-image: linear-gradient(
229
-        180deg,
230
-        transparent,
231
-        rgba(0, 0, 0, 0.6)
232
-      );
233
-      width: 100vw;
234
-      justify-content: flex-end;
235
-      padding-bottom: 33px;
236
-      align-items: center;
237
-      .block1 {
238
-        width: 180px;
239
-        height: 113px;
240
-        .section1 {
241
-          height: 48px;
242
-          border-radius: 8px;
243
-          background-size: 100% auto;
244
-          background-color: #fff;
245
-          width: 180px;
246
-          justify-content: center;
247
-          align-items: center;
248
-          border: 0;
249
-        }
250
-        .info2 {
251
-          width: 152px;
252
-          height: 54px;
253
-          display: block;
254
-          color: #fff;
255
-          text-align: center;
256
-          align-self: center;
257
-          margin-top: 12px;
258
-          background-size: 100% auto;
259
-          background-repeat: no-repeat;
260
-        }
261
-      }
262
-    }
263 222
   }
264 223
 
265 224
   // 第二个页面
@@ -284,35 +243,6 @@ export default {
284 243
           top: 0;
285 244
         }
286 245
       }
287
-      .wrap5 {
288
-        height: 137px;
289
-        background-color: #efe9e0;
290
-        width: 100vw;
291
-        justify-content: center;
292
-        align-items: center;
293
-        display: flex;
294
-        .txt1 {
295
-          background-size: 100% auto;
296
-          background-repeat: no-repeat;
297
-          width: 112px;
298
-          height: 18px;
299
-          margin-bottom: 80px;
300
-        }
301
-      }
302
-
303
-      .main5 {
304
-        background-size: 100% auto;
305
-        background-repeat: no-repeat;
306
-        height: 48px;
307
-        border-radius: 8px;
308
-        margin-top: 11px;
309
-        width: 343px;
310
-        background-color: #b12b32;
311
-        border: 0;
312
-        position: fixed;
313
-        z-index: 15;
314
-        bottom: 5vh;
315
-      }
316 246
     }
317 247
   }
318 248
 }

+ 3
- 5
src/components/Popup.vue Ver arquivo

@@ -42,7 +42,7 @@
42 42
           </div>
43 43
           <!-- 右侧 -->
44 44
           <div class="section-box">
45
-            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}" v-if="isPrize">
45
+            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}">
46 46
               <img src="../assets/buttonImg/myPrize.png" alt />
47 47
             </div>
48 48
             <div
@@ -119,9 +119,7 @@ export default {
119 119
   },
120 120
   watch: {
121 121
     show(val) {
122
-      console.log(this.isPrize, 'aaaaaaaaaaaa')
123
-
124
-      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
122
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize)
125 123
       this.showSelf = val
126 124
       if (this.show === false) {
127 125
         this.myShareShow = false
@@ -313,7 +311,7 @@ export default {
313 311
     justify-content: space-between;
314 312
 
315 313
     img {
316
-      width: 100%;
314
+      width: 90%;
317 315
       background-size: 100% auto;
318 316
       margin-top: 0;
319 317
       border-radius: 18px;

+ 44
- 44
src/components/ShaerPopup.vue Ver arquivo

@@ -149,6 +149,50 @@ export default {
149 149
       animation: tipup 1s ease infinite;
150 150
     }
151 151
   }
152
+
153
+  .dialog-sprite {
154
+    width: 100vw;
155
+    display: flex;
156
+    justify-content: center;
157
+    position: relative;
158
+    .dialog-body {
159
+      flex: 1;
160
+      overflow-x: hidden;
161
+      overflow-y: scroll;
162
+      padding: 0 15px 20px 15px;
163
+      //中间卡片
164
+      .bd2 {
165
+        z-index: 33;
166
+        width: 100%;
167
+        justify-content: flex-start;
168
+        align-items: center;
169
+        margin-top: 20px;
170
+
171
+        .pic1 {
172
+          z-index: 45;
173
+          width: 280px;
174
+          height: 464px;
175
+        }
176
+      }
177
+      //底部按钮
178
+      .bd1 {
179
+        width: 100%;
180
+        background-size: 100% auto;
181
+        margin: 10px auto 0;
182
+        .btn {
183
+          z-index: 42;
184
+          width: 162px;
185
+          height: 46.8px;
186
+          display: block;
187
+          text-align: center;
188
+          align-self: center;
189
+          margin-top: 12px;
190
+          background-size: 100% auto;
191
+          background-repeat: no-repeat;
192
+        }
193
+      }
194
+    }
195
+  }
152 196
 }
153 197
 @keyframes tipup {
154 198
   0% {
@@ -161,49 +205,5 @@ export default {
161 205
     transform: translateY(0%);
162 206
   }
163 207
 }
164
-
165
-.dialog-sprite {
166
-  width: 100vw;
167
-  display: flex;
168
-  justify-content: center;
169
-  position: relative;
170
-  .dialog-body {
171
-    flex: 1;
172
-    overflow-x: hidden;
173
-    overflow-y: scroll;
174
-    padding: 0 15px 20px 15px;
175
-    //中间卡片
176
-    .bd2 {
177
-      z-index: 33;
178
-      width: 100%;
179
-      justify-content: flex-start;
180
-      align-items: center;
181
-      margin-top: 20px;
182
-
183
-      .pic1 {
184
-        z-index: 45;
185
-        width: 280px;
186
-        height: 464px;
187
-      }
188
-    }
189
-    //底部按钮
190
-    .bd1 {
191
-      width: 100%;
192
-      background-size: 100% auto;
193
-      margin: 10px auto 0;
194
-      .btn {
195
-        z-index: 42;
196
-        width: 180px;
197
-        height: 52px;
198
-        display: block;
199
-        text-align: center;
200
-        align-self: center;
201
-        margin-top: 12px;
202
-        background-size: 100% auto;
203
-        background-repeat: no-repeat;
204
-      }
205
-    }
206
-  }
207
-}
208 208
 </style>
209 209
 

+ 1
- 1
src/components/WinningPopup.vue Ver arquivo

@@ -251,7 +251,7 @@ export default {
251 251
         background-position: 50% 50%;
252 252
         background-repeat: no-repeat;
253 253
         padding-top: 0;
254
-        width: 100%;
254
+        width: 90%;
255 255
       }
256 256
     }
257 257
   }

+ 10
- 4
src/pages/Honghe.vue Ver arquivo

@@ -175,7 +175,7 @@ export default {
175 175
       prizeList: [],
176 176
       bingoId: rand(0, 12) + 1, // 可以抽奖的月份
177 177
       NOMyWinningShow: true,
178
-      PrizeState: 0
178
+      PrizeState: null
179 179
     }
180 180
   },
181 181
   computed: {
@@ -197,7 +197,7 @@ export default {
197 197
       return undefined
198 198
     },
199 199
     noPrize() {
200
-      if (this.prizeList.length && this.person.prizeId) {
200
+      if (this.prizeList.length) {
201 201
         return this.prizeList.reduce((sum, x) => x.exitsNum + sum, 0) <= 0
202 202
       }
203 203
 
@@ -258,7 +258,10 @@ export default {
258 258
 
259 259
       // 如果点击可以抽奖
260 260
       if (month.id === this.bingoId && !this.noPrize) {
261
-        //------------奖品没了-------------------------------------------
261
+        if (this.person.prizeId) {
262
+          this.PrizeState = 0
263
+        }
264
+
262 265
         if (!this.person.personId) {
263 266
           // 报错, 提示刷新页面
264 267
         } else {
@@ -271,6 +274,7 @@ export default {
271 274
         }
272 275
       } else {
273 276
         this.showPopup = true
277
+        this.PrizeState = 2
274 278
       }
275 279
     },
276 280
     // 抽奖
@@ -280,13 +284,15 @@ export default {
280 284
           // 更新人员信息
281 285
           this.person = res
282 286
           this.showMyWinning = true
287
+          // this.PrizeState = 0
288
+
283 289
           console.log('showMyWinning-----------')
284 290
 
285 291
           // 其他动作
286 292
         })
287 293
         .catch((err) => {
288 294
           if (err && err.code === 9999) {
289
-            this.PrizeState = 1
295
+            this.PrizeState = 2
290 296
 
291 297
             // 奖品没了
292 298
           } else {

+ 5
- 6
src/pages/SaveShare.vue Ver arquivo

@@ -105,7 +105,7 @@ export default {
105 105
 }
106 106
 </script>
107 107
 
108
-<style lang="less" scoper>
108
+<style lang="less" scoped>
109 109
 .flex-col {
110 110
   display: flex;
111 111
   flex-direction: column;
@@ -138,21 +138,20 @@ export default {
138 138
     padding-bottom: 33px;
139 139
     align-items: center;
140 140
     .block1 {
141
-      width: 180px;
142 141
       height: 113px;
143 142
       .section1 {
144
-        height: 48px;
143
+        height: 43.2px;
145 144
         border-radius: 8px;
146 145
         background-size: 100% auto;
147 146
         background-color: #fff;
148
-        width: 180px;
147
+        width: 162px;
149 148
         justify-content: center;
150 149
         align-items: center;
151 150
         border: 0;
152 151
       }
153 152
       .info2 {
154
-        width: 152px;
155
-        height: 54px;
153
+        width: 136.8px;
154
+        height: 48.6px;
156 155
         display: block;
157 156
         color: #fff;
158 157
         text-align: center;