Baozhangchao hace 3 años
padre
commit
99c43ce280
Se han modificado 4 ficheros con 30 adiciones y 12 borrados
  1. 17
    3
      src/components/MyWinning.vue
  2. 2
    4
      src/components/Popup.vue
  3. 10
    4
      src/pages/Honghe.vue
  4. 1
    1
      vue.config.js

+ 17
- 3
src/components/MyWinning.vue Ver fichero

7
         @click="cancelPopupts"
7
         @click="cancelPopupts"
8
       ></div>
8
       ></div>
9
       <div>
9
       <div>
10
-        <div v-if="PrizeState===0">
10
+        <div v-if="Prize!=undefined">
11
           <!-- 领取屏保 -->
11
           <!-- 领取屏保 -->
12
           <div class="outer3 flex-col">
12
           <div class="outer3 flex-col">
13
             <div class="haibao">
13
             <div class="haibao">
21
           </div>
21
           </div>
22
         </div>
22
         </div>
23
         <div v-else style="overflow: auto;height:100vh;">
23
         <div v-else style="overflow: auto;height:100vh;">
24
-          <!-- 挂历 -->
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;">
25
           <div class="page flex-col">
34
           <div class="page flex-col">
26
             <div class="group1 flex-col">
35
             <div class="group1 flex-col">
27
               <div class="wrap3 flex-col">
36
               <div class="wrap3 flex-col">
28
                 <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
37
                 <img src="../assets/prizeImg/activityOver.jpg" class="subhaibao" />
38
+                <!-- 活动结束 -->
29
               </div>
39
               </div>
30
             </div>
40
             </div>
31
           </div>
41
           </div>
63
     },
73
     },
64
     Prize: {
74
     Prize: {
65
       type: Object
75
       type: Object
76
+      // default: () => ({})
66
     }
77
     }
67
   },
78
   },
68
 
79
 
79
 
90
 
80
   watch: {
91
   watch: {
81
     stater(val, res) {
92
     stater(val, res) {
82
-      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
+      )
83
     },
97
     },
84
     created() {
98
     created() {
85
       // this.showSelf = this.show
99
       // this.showSelf = this.show

+ 2
- 4
src/components/Popup.vue Ver fichero

41
           </div>
41
           </div>
42
           <!-- 右侧 -->
42
           <!-- 右侧 -->
43
           <div class="section-box">
43
           <div class="section-box">
44
-            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}" v-if="isPrize">
44
+            <div class="section-box-share" @click="()=>{this.MyWinningShow=true}">
45
               <img src="../assets/buttonImg/myPrize.png" alt />
45
               <img src="../assets/buttonImg/myPrize.png" alt />
46
             </div>
46
             </div>
47
             <div
47
             <div
117
   },
117
   },
118
   watch: {
118
   watch: {
119
     show(val) {
119
     show(val) {
120
-      console.log(this.isPrize, 'aaaaaaaaaaaa')
121
-
122
-      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
120
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize)
123
       this.showSelf = val
121
       this.showSelf = val
124
       if (this.show === false) {
122
       if (this.show === false) {
125
         this.myShareShow = false
123
         this.myShareShow = false

+ 10
- 4
src/pages/Honghe.vue Ver fichero

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 {

+ 1
- 1
vue.config.js Ver fichero

11
   devServer: {
11
   devServer: {
12
     proxy: {
12
     proxy: {
13
       '/api': {
13
       '/api': {
14
-        target: "http://192.168.89.147:8080/",
14
+        target: "http://192.168.89.147:9000/",
15
         // ws: true,
15
         // ws: true,
16
         changeOrigin: true,
16
         changeOrigin: true,
17
         // pathRewrite: {
17
         // pathRewrite: {