Browse Source

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

张延森 3 years ago
parent
commit
eb63601f30

+ 8
- 10
src/components/CalendarPoster.vue View File

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

+ 17
- 87
src/components/MyWinning.vue View File

1
 <template>
1
 <template>
2
   <div v-if="show" class="dialog-my">
2
   <div v-if="show" class="dialog-my">
3
     <div style=" height:100vh; width:100%;">
3
     <div style=" height:100vh; width:100%;">
4
-      <!-- 弹窗 -->
5
-      <!-- <ShaerPopup :show="shaerShow" @closeMyself="cancelPopup" /> -->
6
-      <!-- 弹窗 -->
7
-
8
-      <!-- <router-link :to="{path:'/'}"> -->
9
       <div
4
       <div
10
         class="backhome"
5
         class="backhome"
11
         :style="`background:url('${backimg}');background-size: 100% auto;`"
6
         :style="`background:url('${backimg}');background-size: 100% auto;`"
12
         @click="cancelPopupts"
7
         @click="cancelPopupts"
13
       ></div>
8
       ></div>
14
-      <!-- </router-link> -->
15
-
16
       <div>
9
       <div>
17
-        <div v-if="PrizeState===0">
10
+        <div v-if="Prize!=undefined">
18
           <!-- 领取屏保 -->
11
           <!-- 领取屏保 -->
19
           <div class="outer3 flex-col">
12
           <div class="outer3 flex-col">
20
             <div class="haibao">
13
             <div class="haibao">
28
           </div>
21
           </div>
29
         </div>
22
         </div>
30
         <div v-else style="overflow: auto;height:100vh;">
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
           <div class="page flex-col">
34
           <div class="page flex-col">
33
             <div class="group1 flex-col">
35
             <div class="group1 flex-col">
34
               <div class="wrap3 flex-col">
36
               <div class="wrap3 flex-col">
35
                 <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
37
                 <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
38
+                <!-- 活动结束 -->
36
               </div>
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
             </div>
40
             </div>
46
           </div>
41
           </div>
47
         </div>
42
         </div>
78
     },
73
     },
79
     Prize: {
74
     Prize: {
80
       type: Object
75
       type: Object
76
+      // default: () => ({})
81
     }
77
     }
82
   },
78
   },
83
 
79
 
94
 
90
 
95
   watch: {
91
   watch: {
96
     stater(val, res) {
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
     created() {
98
     created() {
100
       // this.showSelf = this.show
99
       // this.showSelf = this.show
112
     /** 取消按钮操作 */
111
     /** 取消按钮操作 */
113
     cancelPopupts() {
112
     cancelPopupts() {
114
       // this.shaerShow = false
113
       // this.shaerShow = false
115
-      // console.log(22222222222222222222222)
116
       this.$emit('cancelPopus', true)
114
       this.$emit('cancelPopus', true)
117
     },
115
     },
118
 
116
 
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
           top: 0;
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 View File

42
           </div>
42
           </div>
43
           <!-- 右侧 -->
43
           <!-- 右侧 -->
44
           <div class="section-box">
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
               <img src="../assets/buttonImg/myPrize.png" alt />
46
               <img src="../assets/buttonImg/myPrize.png" alt />
47
             </div>
47
             </div>
48
             <div
48
             <div
119
   },
119
   },
120
   watch: {
120
   watch: {
121
     show(val) {
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
       this.showSelf = val
123
       this.showSelf = val
126
       if (this.show === false) {
124
       if (this.show === false) {
127
         this.myShareShow = false
125
         this.myShareShow = false
313
     justify-content: space-between;
311
     justify-content: space-between;
314
 
312
 
315
     img {
313
     img {
316
-      width: 100%;
314
+      width: 90%;
317
       background-size: 100% auto;
315
       background-size: 100% auto;
318
       margin-top: 0;
316
       margin-top: 0;
319
       border-radius: 18px;
317
       border-radius: 18px;

+ 44
- 44
src/components/ShaerPopup.vue View File

149
       animation: tipup 1s ease infinite;
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
 @keyframes tipup {
197
 @keyframes tipup {
154
   0% {
198
   0% {
161
     transform: translateY(0%);
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
 </style>
208
 </style>
209
 
209
 

+ 1
- 1
src/components/WinningPopup.vue View File

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

+ 10
- 4
src/pages/Honghe.vue View File

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

+ 5
- 6
src/pages/SaveShare.vue View File

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