Przeglądaj źródła

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

张延森 3 lat temu
rodzic
commit
c8982bd4b0

+ 5
- 30
src/components/MyWinning.vue Wyświetl plik

@@ -18,35 +18,7 @@
18 18
           <!-- 领取屏保 -->
19 19
           <div class="outer3 flex-col">
20 20
             <div class="haibao">
21
-              <img class="haibao" :src="currentMonth.calendarImg" alt />
22
-            </div>
23
-            <div class="mod2 flex-col">
24
-              <!-- <div class="block1 flex-col">
25
-                <div
26
-                  class="section1 flex-col"
27
-                  @click="()=>{this.shaerShow=true}"
28
-                  :style="`background-image: url(${shaerBut});`"
29
-                ></div>
30
-                <span :style="`background-image: url(${pressImage});`" class="info2"></span>
31
-              </div>-->
32
-            </div>
33
-          </div>
34
-        </div>
35
-        <div v-else style="overflow: auto;height:100vh;">
36
-          <!-- 挂历 -->
37
-          <div class="page flex-col">
38
-            <div class="group1 flex-col">
39
-              <div class="wrap3 flex-col">
40
-                <img :src="currentMonth.calendarImg" class="subhaibao" />
41
-              </div>
42
-              <!-- <div class="wrap5 flex-col">
43
-                <span class="txt1" :style="`background-image: url(${pressLucky});`"></span>
44
-                <div
45
-                  class="main5 flex-col"
46
-                  :style="`background-image: url(${shaerButRed});`"
47
-                  @click="()=>{this.shaerShow=true}"
48
-                ></div>
49
-              </div>-->
21
+              <img class="haibao" src="../assets/prizeImg/MyPrize.jpg" alt />
50 22
             </div>
51 23
           </div>
52 24
         </div>
@@ -59,7 +31,7 @@
59 31
 import { hideLoading } from '@/utils'
60 32
 
61 33
 export default {
62
-  name: 'CalendarPoster',
34
+  name: 'MyWinning',
63 35
   components: {
64 36
     ShaerPopup: () => import('@/components/ShaerPopup.vue')
65 37
   },
@@ -74,6 +46,9 @@ export default {
74 46
       default: '取消',
75 47
       required: false
76 48
     },
49
+    currentMonth: {
50
+      type: Object
51
+    },
77 52
     currentPerson: {
78 53
       type: Object
79 54
     },

+ 7
- 2
src/components/Popup.vue Wyświetl plik

@@ -8,7 +8,7 @@
8 8
     />
9 9
 
10 10
     <!-- 我的奖品 -->
11
-    <MyWinning :show="MyWinningShow" @cancel="canclMyWinning" :current-month="currentMonth" />
11
+    <MyWinning :show="MyWinningShow" @cancelPopus="canclMyWinning" :current-month="currentMonth" />
12 12
 
13 13
     <div class="dialog-mark" @click.self="closeMyself">
14 14
       <div v-show="myShareShow" class="sharetiptxt" style>
@@ -36,7 +36,7 @@
36 36
           </div>
37 37
           <!-- 右侧 -->
38 38
           <div class="section-box">
39
-            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}">
39
+            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}" v-if="isPrize">
40 40
               <img src="../assets/buttonImg/myPrize.png" alt />
41 41
             </div>
42 42
             <div
@@ -74,6 +74,9 @@ export default {
74 74
     currentMonth: {
75 75
       type: Object
76 76
     },
77
+    isPrize: {
78
+      type: Object
79
+    },
77 80
     showCancel: {
78 81
       typs: Boolean,
79 82
       default: false,
@@ -111,6 +114,8 @@ export default {
111 114
   },
112 115
   watch: {
113 116
     show(val) {
117
+      console.log(this.isPrize, 'aaaaaaaaaaaa')
118
+
114 119
       console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
115 120
       this.showSelf = val
116 121
       if (this.show === false) {

+ 3
- 28
src/components/WinningPopup.vue Wyświetl plik

@@ -41,7 +41,7 @@
41 41
 
42 42
 <script>
43 43
 export default {
44
-  name: 'Popup',
44
+  name: 'WinningPopup',
45 45
   components: {},
46 46
   props: {
47 47
     show: {
@@ -196,17 +196,6 @@ export default {
196 196
     }
197 197
   }
198 198
 }
199
-@keyframes tipup {
200
-  0% {
201
-    transform: translateY(0%);
202
-  }
203
-  50% {
204
-    transform: translateY(5%);
205
-  }
206
-  100% {
207
-    transform: translateY(0%);
208
-  }
209
-}
210 199
 
211 200
 .dialog-sprite {
212 201
   width: 100vw;
@@ -265,24 +254,10 @@ export default {
265 254
         }
266 255
       }
267 256
       .flipped {
268
-        animation: change 0.8s linear forwards;
269
-      }
270
-    }
271
-    @keyframes change {
272
-      from {
273
-        top: -20vh;
274
-        left: -20vw;
275
-        opacity: 0;
276
-        transform: scale(0.5);
277
-      }
278
-      to {
279
-        top: -0;
280
-        left: -0;
281
-        opacity: 2;
282
-        transform: scale(1);
283
-        transform: rotateY(180deg);
257
+        // animation: change 0.8s linear forwards;
284 258
       }
285 259
     }
260
+
286 261
     //底部按钮
287 262
     .dialog-footer {
288 263
       width: 140px;

+ 17
- 4
src/pages/Honghe.vue Wyświetl plik

@@ -1,8 +1,13 @@
1 1
 <template>
2 2
   <div class="index-box">
3 3
     <bg-music />
4
-    <popup :show="showPopup" @cancel="cancelFrom" :current-month="currentMonth" />
5
-    <MyWinning :show="showMyWinning" :current-month="currentMonth" />
4
+    <popup
5
+      :show="showPopup"
6
+      @cancel="cancelFrom"
7
+      :current-month="currentMonth"
8
+      :is-prize="myPrize"
9
+    />
10
+    <WinningPopup :show="showMyWinning" @cancel="cancelWinnint" :current-person="person" />
6 11
     <img class="topImage" src="../assets/indexImg/indexBgctop.jpg" alt />
7 12
     <div class="outer6-wrapper">
8 13
       <div class="outer6 flex-col">
@@ -166,6 +171,15 @@ export default {
166 171
       set(val) {
167 172
         useModel('person')[1](val)
168 173
       }
174
+    },
175
+    myPrize() {
176
+      if (this.prizeList.length && this.person.prizeId) {
177
+        return this.prizeList.filter(
178
+          (x) => x.prizeId === this.person.prizeId
179
+        )[0]
180
+      }
181
+
182
+      return undefined
169 183
     }
170 184
   },
171 185
   created() {
@@ -191,13 +205,11 @@ export default {
191 205
         }
192 206
       })
193 207
       this.currentMonth = month
194
-      this.showMyWinning = true
195 208
 
196 209
       console.log(
197 210
         '🚀 ~ file: Honghe.vue ~ line 193 ~ handleMonthClick ~ month',
198 211
         month
199 212
       )
200
-      
201 213
 
202 214
       // 如果点击可以抽奖
203 215
       if (month.id === this.bingoId) {
@@ -220,6 +232,7 @@ export default {
220 232
       drawLottery(this.person).then((res) => {
221 233
         // 更新人员信息
222 234
         this.person = res
235
+        this.showMyWinning = true
223 236
 
224 237
         // 其他动作
225 238
       })