소스 검색

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

张延森 3 년 전
부모
커밋
c8982bd4b0
4개의 변경된 파일32개의 추가작업 그리고 64개의 파일을 삭제
  1. 5
    30
      src/components/MyWinning.vue
  2. 7
    2
      src/components/Popup.vue
  3. 3
    28
      src/components/WinningPopup.vue
  4. 17
    4
      src/pages/Honghe.vue

+ 5
- 30
src/components/MyWinning.vue 파일 보기

18
           <!-- 领取屏保 -->
18
           <!-- 领取屏保 -->
19
           <div class="outer3 flex-col">
19
           <div class="outer3 flex-col">
20
             <div class="haibao">
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
             </div>
22
             </div>
51
           </div>
23
           </div>
52
         </div>
24
         </div>
59
 import { hideLoading } from '@/utils'
31
 import { hideLoading } from '@/utils'
60
 
32
 
61
 export default {
33
 export default {
62
-  name: 'CalendarPoster',
34
+  name: 'MyWinning',
63
   components: {
35
   components: {
64
     ShaerPopup: () => import('@/components/ShaerPopup.vue')
36
     ShaerPopup: () => import('@/components/ShaerPopup.vue')
65
   },
37
   },
74
       default: '取消',
46
       default: '取消',
75
       required: false
47
       required: false
76
     },
48
     },
49
+    currentMonth: {
50
+      type: Object
51
+    },
77
     currentPerson: {
52
     currentPerson: {
78
       type: Object
53
       type: Object
79
     },
54
     },

+ 7
- 2
src/components/Popup.vue 파일 보기

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
     <div class="dialog-mark" @click.self="closeMyself">
13
     <div class="dialog-mark" @click.self="closeMyself">
14
       <div v-show="myShareShow" class="sharetiptxt" style>
14
       <div v-show="myShareShow" class="sharetiptxt" style>
36
           </div>
36
           </div>
37
           <!-- 右侧 -->
37
           <!-- 右侧 -->
38
           <div class="section-box">
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
               <img src="../assets/buttonImg/myPrize.png" alt />
40
               <img src="../assets/buttonImg/myPrize.png" alt />
41
             </div>
41
             </div>
42
             <div
42
             <div
74
     currentMonth: {
74
     currentMonth: {
75
       type: Object
75
       type: Object
76
     },
76
     },
77
+    isPrize: {
78
+      type: Object
79
+    },
77
     showCancel: {
80
     showCancel: {
78
       typs: Boolean,
81
       typs: Boolean,
79
       default: false,
82
       default: false,
111
   },
114
   },
112
   watch: {
115
   watch: {
113
     show(val) {
116
     show(val) {
117
+      console.log(this.isPrize, 'aaaaaaaaaaaa')
118
+
114
       console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
119
       console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
115
       this.showSelf = val
120
       this.showSelf = val
116
       if (this.show === false) {
121
       if (this.show === false) {

+ 3
- 28
src/components/WinningPopup.vue 파일 보기

41
 
41
 
42
 <script>
42
 <script>
43
 export default {
43
 export default {
44
-  name: 'Popup',
44
+  name: 'WinningPopup',
45
   components: {},
45
   components: {},
46
   props: {
46
   props: {
47
     show: {
47
     show: {
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
 .dialog-sprite {
200
 .dialog-sprite {
212
   width: 100vw;
201
   width: 100vw;
265
         }
254
         }
266
       }
255
       }
267
       .flipped {
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
     .dialog-footer {
262
     .dialog-footer {
288
       width: 140px;
263
       width: 140px;

+ 17
- 4
src/pages/Honghe.vue 파일 보기

1
 <template>
1
 <template>
2
   <div class="index-box">
2
   <div class="index-box">
3
     <bg-music />
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
     <img class="topImage" src="../assets/indexImg/indexBgctop.jpg" alt />
11
     <img class="topImage" src="../assets/indexImg/indexBgctop.jpg" alt />
7
     <div class="outer6-wrapper">
12
     <div class="outer6-wrapper">
8
       <div class="outer6 flex-col">
13
       <div class="outer6 flex-col">
166
       set(val) {
171
       set(val) {
167
         useModel('person')[1](val)
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
   created() {
185
   created() {
191
         }
205
         }
192
       })
206
       })
193
       this.currentMonth = month
207
       this.currentMonth = month
194
-      this.showMyWinning = true
195
 
208
 
196
       console.log(
209
       console.log(
197
         '🚀 ~ file: Honghe.vue ~ line 193 ~ handleMonthClick ~ month',
210
         '🚀 ~ file: Honghe.vue ~ line 193 ~ handleMonthClick ~ month',
198
         month
211
         month
199
       )
212
       )
200
-      
201
 
213
 
202
       // 如果点击可以抽奖
214
       // 如果点击可以抽奖
203
       if (month.id === this.bingoId) {
215
       if (month.id === this.bingoId) {
220
       drawLottery(this.person).then((res) => {
232
       drawLottery(this.person).then((res) => {
221
         // 更新人员信息
233
         // 更新人员信息
222
         this.person = res
234
         this.person = res
235
+        this.showMyWinning = true
223
 
236
 
224
         // 其他动作
237
         // 其他动作
225
       })
238
       })