Baozhangchao 3 years ago
parent
commit
c4a248c16e
3 changed files with 22 additions and 22 deletions
  1. 8
    6
      src/components/MyWinning.vue
  2. 9
    6
      src/components/Popup.vue
  3. 5
    10
      src/pages/Honghe.vue

+ 8
- 6
src/components/MyWinning.vue View File

14
       <!-- </router-link> -->
14
       <!-- </router-link> -->
15
 
15
 
16
       <div>
16
       <div>
17
-        <div v-if="PrizeState!==0">
17
+        <div v-if="PrizeState===0">
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="../assets/prizeImg/MyPrize.jpg" alt />
21
               <img class="haibao" src="../assets/prizeImg/MyPrize.jpg" alt />
22
 
22
 
23
               <div class="haibao-jiangping">
23
               <div class="haibao-jiangping">
24
-                <img src="../../public/images/banana.png" alt />
24
+                <img v-if="Prize" :src="`${Prize.thumb}`" alt />
25
+                <h1 v-else>暂无奖品</h1>
25
               </div>
26
               </div>
26
             </div>
27
             </div>
27
           </div>
28
           </div>
31
           <div class="page flex-col">
32
           <div class="page flex-col">
32
             <div class="group1 flex-col">
33
             <div class="group1 flex-col">
33
               <div class="wrap3 flex-col">
34
               <div class="wrap3 flex-col">
34
-                <img :src="currentMonth.calendarImg" class="subhaibao" />
35
+                <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
35
               </div>
36
               </div>
36
               <!-- <div class="wrap5 flex-col">
37
               <!-- <div class="wrap5 flex-col">
37
                 <span class="txt1" :style="`background-image: url(${pressLucky});`"></span>
38
                 <span class="txt1" :style="`background-image: url(${pressLucky});`"></span>
54
 
55
 
55
 export default {
56
 export default {
56
   name: 'MyWinning',
57
   name: 'MyWinning',
57
-  components: {
58
-    ShaerPopup: () => import('@/components/ShaerPopup.vue')
59
-  },
58
+
60
   props: {
59
   props: {
61
     show: {
60
     show: {
62
       type: Boolean,
61
       type: Boolean,
76
     },
75
     },
77
     PrizeState: {
76
     PrizeState: {
78
       type: Number
77
       type: Number
78
+    },
79
+    Prize: {
80
+      type: Object
79
     }
81
     }
80
   },
82
   },
81
 
83
 

+ 9
- 6
src/components/Popup.vue View File

8
     />
8
     />
9
 
9
 
10
     <!-- 我的奖品 -->
10
     <!-- 我的奖品 -->
11
-    <MyWinning :show="MyWinningShow" @cancelPopus="canclMyWinning" :current-month="currentMonth" />
12
-
11
+    <MyWinning
12
+      :show="MyWinningShow"
13
+      @cancelPopus="canclMyWinning"
14
+      :current-month="currentMonth"
15
+      :PrizeState="PrizeState"
16
+      :Prize="isPrize"
17
+    />
13
     <div class="dialog-mark" @click.self="closeMyself">
18
     <div class="dialog-mark" @click.self="closeMyself">
14
       <div v-show="myShareShow" class="sharetiptxt" style>
19
       <div v-show="myShareShow" class="sharetiptxt" style>
15
         <img style=" height:100%;" src="../assets/buttonImg/shareText.png" alt />
20
         <img style=" height:100%;" src="../assets/buttonImg/shareText.png" alt />
87
       default: '取消',
92
       default: '取消',
88
       required: false
93
       required: false
89
     },
94
     },
90
-    confirmText: {
91
-      type: String,
92
-      default: '确定',
93
-      required: false
95
+    PrizeState: {
96
+      type: Number
94
     }
97
     }
95
     // LoadingShow: {
98
     // LoadingShow: {
96
     //   type: Boolean,
99
     //   type: Boolean,

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

6
       @cancel="cancelFrom"
6
       @cancel="cancelFrom"
7
       :current-month="currentMonth"
7
       :current-month="currentMonth"
8
       :is-prize="myPrize"
8
       :is-prize="myPrize"
9
-    />
10
-    <WinningPopup :show="showMyWinning" @cancel="cancelWinnint" :current-person="person" />
11
-
12
-    <!-- 奖品没了 -->
13
-    <MyWinning
14
-      :show="NOMyWinningShow"
15
-      @cancelPopus="canclMyWinning"
16
-      :current-month="currentMonth"
17
       :PrizeState="PrizeState"
9
       :PrizeState="PrizeState"
18
     />
10
     />
11
+    <WinningPopup :show="showMyWinning" @cancel="canclMyWinning" :current-person="person" />
12
+    <!-- 奖品没了 -->
19
 
13
 
20
     <img class="topImage" src="../assets/indexImg/indexBgctop.jpg" alt />
14
     <img class="topImage" src="../assets/indexImg/indexBgctop.jpg" alt />
21
     <div class="outer6-wrapper">
15
     <div class="outer6-wrapper">
209
         }
203
         }
210
       })
204
       })
211
     },
205
     },
212
-    cancelWinnint() {
206
+    canclMyWinning() {
213
       this.showMyWinning = false
207
       this.showMyWinning = false
214
     },
208
     },
215
     handleMonthClick(month) {
209
     handleMonthClick(month) {
253
         })
247
         })
254
         .catch((err) => {
248
         .catch((err) => {
255
           if (err && err.code === 9999) {
249
           if (err && err.code === 9999) {
250
+            this.PrizeState = 1
251
+
256
             // 奖品没了
252
             // 奖品没了
257
-            ;(this.NOMyWinningShow = true), (this.PrizeState = 0)
258
           } else {
253
           } else {
259
             // 其他错误
254
             // 其他错误
260
             const errMsg = err.message || err
255
             const errMsg = err.message || err