Procházet zdrojové kódy

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

Baozhangchao před 3 roky
rodič
revize
a896f58401

binární
public/images/fanbubao.png Zobrazit soubor


binární
public/images/fanbubao2.png Zobrazit soubor


binární
public/images/madai.png Zobrazit soubor


binární
public/images/madai2.png Zobrazit soubor


binární
src/assets/luckyImg/1.jpg Zobrazit soubor


binární
src/assets/luckyImg/10.jpg Zobrazit soubor


binární
src/assets/luckyImg/11.jpg Zobrazit soubor


binární
src/assets/luckyImg/12.jpg Zobrazit soubor


binární
src/assets/luckyImg/2.jpg Zobrazit soubor


binární
src/assets/luckyImg/3.jpg Zobrazit soubor


binární
src/assets/luckyImg/4.jpg Zobrazit soubor


binární
src/assets/luckyImg/5.jpg Zobrazit soubor


binární
src/assets/luckyImg/6.jpg Zobrazit soubor


binární
src/assets/luckyImg/7.jpg Zobrazit soubor


binární
src/assets/luckyImg/8.jpg Zobrazit soubor


binární
src/assets/luckyImg/9.jpg Zobrazit soubor


binární
src/assets/monthImg/February2.jpg Zobrazit soubor


binární
src/assets/prizeImg/MyPrize.jpg Zobrazit soubor


binární
src/assets/prizeImg/notPrize.jpg Zobrazit soubor


+ 14
- 12
src/components/Modal.vue Zobrazit soubor

@@ -3,16 +3,18 @@
3 3
     <div class="modal" :style="modalStyle" @click.stop="handleMaskClick">
4 4
       <fire-flies v-if="showFireflies"></fire-flies>
5 5
       <div class="modal-action back-btn" v-if="showBack" @click.stop="$emit('close')">
6
-        <img src="~@/assets/buttonImg/backImg.png" alt="">
6
+        <img src="~@/assets/buttonImg/backImg.png" alt />
7 7
       </div>
8 8
       <div class="modal-action share-guide" v-if="showShare">
9
-        <img src="~@/assets/buttonImg/shareText.png" alt="">
9
+        <img src="~@/assets/buttonImg/shareText.png" alt />
10
+      </div>
11
+      <div class="modal-action">
12
+        <slot name="action"></slot>
13
+      </div>
14
+      <div class="modal-body">
15
+        <slot></slot>
10 16
       </div>
11
-      <div class="modal-action"><slot name="action"></slot></div>
12
-      <div class="modal-body"><slot></slot></div>
13
-
14 17
     </div>
15
-
16 18
   </div>
17 19
 </template>
18 20
 
@@ -26,11 +28,11 @@ export default {
26 28
     show: Boolean,
27 29
     mask: {
28 30
       type: Boolean,
29
-      default: true,
31
+      default: true
30 32
     },
31 33
     maskClickCloseable: {
32 34
       type: Boolean,
33
-      default: true,
35
+      default: true
34 36
     },
35 37
     showBack: Boolean,
36 38
     showFireflies: {
@@ -43,17 +45,17 @@ export default {
43 45
     modalStyle() {
44 46
       return {
45 47
         background: 'rgba(0, 0, 0, 0.6)'
46
-      }
48
+      };
47 49
     }
48 50
   },
49 51
   methods: {
50 52
     handleMaskClick() {
51 53
       if (this.maskClickCloseable) {
52
-        this.$emit('close')
54
+        this.$emit('close');
53 55
       }
54 56
     }
55 57
   }
56
-}
58
+};
57 59
 </script>
58 60
 
59 61
 <style lang="less" scoped>
@@ -92,7 +94,7 @@ export default {
92 94
       top: 0.5em;
93 95
       right: 0em;
94 96
       width: 3em;
95
-      
97
+
96 98
       & > img {
97 99
         width: 100%;
98 100
       }

+ 17
- 17
src/components/MyWinning.vue Zobrazit soubor

@@ -49,7 +49,7 @@
49 49
 </template>
50 50
 
51 51
 <script>
52
-import { hideLoading } from '@/utils'
52
+import { hideLoading } from '@/utils';
53 53
 
54 54
 export default {
55 55
   name: 'MyWinning',
@@ -81,7 +81,7 @@ export default {
81 81
       shaerButRed: require('../assets/buttonImg/sayFriend.png'),
82 82
       pressLucky: require('../assets/buttonImg/happyAccept.png'),
83 83
       PrizeShow: null
84
-    }
84
+    };
85 85
   },
86 86
 
87 87
   watch: {
@@ -89,11 +89,11 @@ export default {
89 89
       // this.showSelf = this.show
90 90
     },
91 91
     mounted() {
92
-      hideLoading() //loading
92
+      hideLoading(); //loading
93 93
 
94
-      this.forbidScroll()
94
+      this.forbidScroll();
95 95
       if (this.show === true) {
96
-        this.transform()
96
+        this.transform();
97 97
       }
98 98
     }
99 99
   },
@@ -101,11 +101,11 @@ export default {
101 101
     /** 取消按钮操作 */
102 102
     cancelPopupts() {
103 103
       // this.shaerShow = false
104
-      this.$emit('cancelPopus', true)
104
+      this.$emit('cancelPopus', true);
105 105
     },
106 106
 
107 107
     cancelPopup() {
108
-      this.shaerShow = false
108
+      this.shaerShow = false;
109 109
     },
110 110
     // shareClick() {
111 111
     //   this.$router.replace({
@@ -121,39 +121,39 @@ export default {
121 121
     // },
122 122
     transform() {
123 123
       setTimeout(() => {
124
-        this.classDivAA = this.show
125
-      }, 0)
124
+        this.classDivAA = this.show;
125
+      }, 0);
126 126
     },
127 127
     /** 禁止页面滚动 */
128 128
     forbidScroll() {
129
-      this.bodyOverflow = document.body.style.overflow
130
-      document.body.style.overflow = 'hidden'
129
+      this.bodyOverflow = document.body.style.overflow;
130
+      document.body.style.overflow = 'hidden';
131 131
     },
132 132
 
133 133
     /**  每次获取之后 zindex 自动增加 */
134 134
     getZIndex() {
135
-      let zIndexInit = 2022112
136
-      return zIndexInit++
135
+      let zIndexInit = 2022112;
136
+      return zIndexInit++;
137 137
     },
138 138
 
139 139
     /** 确认按钮操作 */
140 140
     confirm() {
141
-      this.$emit('confirm', true)
141
+      this.$emit('confirm', true);
142 142
     },
143 143
 
144 144
     /** 点击遮罩关闭弹窗 */
145 145
     closeMyself(event) {
146 146
       // this.sloveBodyOverflow()
147
-      this.$emit('closeMyself', true)
147
+      this.$emit('closeMyself', true);
148 148
     },
149 149
 
150 150
     /** 恢复页面的滚动 */
151 151
     sloveBodyOverflow() {
152 152
       // this.showSelf = false
153
-      document.body.style.overflow = this.bodyOverflow
153
+      document.body.style.overflow = this.bodyOverflow;
154 154
     }
155 155
   }
156
-}
156
+};
157 157
 </script>
158 158
 
159 159
 <style lang="less" scoped>

+ 41
- 21
src/components/Popup.vue Zobrazit soubor

@@ -40,6 +40,10 @@
40 40
             <div class="dialog-footer">
41 41
               <img @click="cancel" class="btn" src="../assets/buttonImg/closeBut.png" alt />
42 42
             </div>
43
+
44
+            <div class="footer-tip" v-if="!noPrize && !(isPrize && isPrize.prizeId)">
45
+              再试几次,惊喜礼品在等你哟
46
+            </div>
43 47
           </div>
44 48
           <!-- 右侧 -->
45 49
           <div class="section-box">
@@ -120,61 +124,61 @@ export default {
120 124
       showPopupCalendarPoster: false,
121 125
       stater: null,
122 126
       MyWinningShow: false
123
-    }
127
+    };
124 128
   },
125 129
   watch: {
126 130
     show(val) {
127
-      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize)
128
-      this.showSelf = val
131
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize);
132
+      this.showSelf = val;
129 133
       if (this.show === false) {
130
-        this.myShareShow = false
134
+        this.myShareShow = false;
131 135
       }
132
-      this.transform()
136
+      this.transform();
133 137
     }
134 138
   },
135 139
   created() {
136
-    this.showSelf = this.show
140
+    this.showSelf = this.show;
137 141
   },
138 142
   mounted() {
139
-    this.forbidScroll()
143
+    this.forbidScroll();
140 144
     if (this.show === true) {
141
-      this.transform()
145
+      this.transform();
142 146
     }
143 147
   },
144 148
   methods: {
145 149
     canclMyWinning() {
146
-      this.MyWinningShow = false
150
+      this.MyWinningShow = false;
147 151
     },
148 152
     canckle() {
149
-      this.showPopupCalendarPoster = false
153
+      this.showPopupCalendarPoster = false;
150 154
     },
151 155
     shareClick() {
152 156
       this.$router.replace({
153 157
         path: 'SaveShare',
154 158
         query: { states: 0 }
155
-      })
159
+      });
156 160
     },
157 161
     transform() {
158 162
       setTimeout(() => {
159
-        this.classDivAA = this.show
160
-      }, 0)
163
+        this.classDivAA = this.show;
164
+      }, 0);
161 165
     },
162 166
     /** 禁止页面滚动 */
163 167
     forbidScroll() {
164
-      this.bodyOverflow = document.body.style.overflow
165
-      document.body.style.overflow = 'hidden'
168
+      this.bodyOverflow = document.body.style.overflow;
169
+      document.body.style.overflow = 'hidden';
166 170
     },
167 171
 
168 172
     /**  每次获取之后 zindex 自动增加 */
169 173
     getZIndex() {
170
-      let zIndexInit = 2022112
171
-      return zIndexInit++
174
+      let zIndexInit = 2022112;
175
+      return zIndexInit++;
172 176
     },
173 177
 
174 178
     /** 取消按钮操作 */
175 179
     cancel() {
176
-      event.stopPropagation()
177
-      this.$emit('cancel', true)
180
+      event.stopPropagation();
181
+      this.$emit('cancel', true);
178 182
     },
179 183
 
180 184
     /** 点击遮罩关闭弹窗 */
@@ -184,10 +188,10 @@ export default {
184 188
 
185 189
     /** 恢复页面的滚动 */
186 190
     sloveBodyOverflow() {
187
-      document.body.style.overflow = this.bodyOverflow
191
+      document.body.style.overflow = this.bodyOverflow;
188 192
     }
189 193
   }
190
-}
194
+};
191 195
 </script>
192 196
 
193 197
 <style lang="less" scoped>
@@ -303,6 +307,22 @@ export default {
303 307
         height: 30.6px;
304 308
       }
305 309
     }
310
+
311
+    .footer-tip {
312
+      color: #fff;
313
+      margin-top: 1em;
314
+      font-size: 0.9em;
315
+      letter-spacing: 1px;
316
+      opacity: 0.2;
317
+
318
+      animation: breaf 2.6s ease infinite;
319
+    }
320
+  }
321
+
322
+  @keyframes breaf {
323
+    50% {
324
+      opacity: 0.8;
325
+    }    
306 326
   }
307 327
   .section-box {
308 328
     position: absolute;

+ 1
- 0
src/components/ShaerPopup.vue Zobrazit soubor

@@ -58,6 +58,7 @@ export default {
58 58
   },
59 59
   watch: {
60 60
     show(val) {
61
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
61 62
       this.showSelf = val
62 63
     }
63 64
   },

+ 2
- 2
src/components/WinningPopup.vue Zobrazit soubor

@@ -220,9 +220,9 @@ export default {
220 220
           transform: rotateY(-180deg); //iPhone异常
221 221
 
222 222
           .PrizeImg {
223
-            width: 55vw;
223
+            width: 40vw;
224 224
             position: absolute;
225
-            height: 48vw;
225
+            height: 40vw;
226 226
             top: 20vh;
227 227
           }
228 228
         }

+ 4
- 0
src/pages/Honghe.vue Zobrazit soubor

@@ -335,6 +335,10 @@ export default {
335 335
           if (err && err.code === 9999) {
336 336
             this.PrizeState = 2
337 337
 
338
+            this.prizeList = this.prizeList.map(x => ({ ...x, exitsNum: 0 }))
339
+            
340
+            alert('对不起,您来晚了,奖品已抽完')
341
+
338 342
             // 奖品没了
339 343
           } else {
340 344
             // 其他错误