Просмотр исходного кода

线下票开奖单个奖品加载问题

DELL 3 лет назад
Родитель
Сommit
865b85a679
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/packagePrize/choice/index.vue

+ 4 - 3
src/packagePrize/choice/index.vue

@@ -134,9 +134,8 @@
 							item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
 							item.prizeType = JSON.parse(item.prizeType)
 						})
-						this.prizeList = res.data.prizeList
-						if(this.prizeList.length == 1) {
-							let item = this.prizeList[this.actionIndex]
+						if(res.data.prizeList.length == 1) {
+							let item = res.data.prizeList[this.actionIndex]
 							this.actionInfo = item
 							$http.post('/api/v1/mp/user/ticket/cashPrize', {
 								ticketId: this.ticketId,
@@ -147,9 +146,11 @@
 									this.comfirmShow = true
 								}
 							})
+							return
 						}
 						this.ticketId = res.data.ticketId
 						this.total = this.prizeList.length
+						this.prizeList = res.data.prizeList
 					} else if (res.code == 1018) {
 						this.tipShow = true
 					} else {