|
@@ -38,6 +38,7 @@
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.ticketId = options.id
|
|
|
+ this.orderId = options.orderId
|
|
|
this.getPrizeList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -45,9 +46,8 @@
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|
|
|
- $http.post('/api/v1/mp/user/ticket/queryHitPrizeList', {
|
|
|
- ticketId: this.ticketId
|
|
|
- }).then(res => {
|
|
|
+ let data = this.orderId ? { orderId: this.orderId } : { ticketId: this.ticketId }
|
|
|
+ $http.post('/api/v1/mp/user/ticket/queryHitPrizeList', data).then(res => {
|
|
|
uni.hideLoading();
|
|
|
if (res.code == 0) {
|
|
|
res.data.forEach(item => {
|
|
@@ -55,7 +55,6 @@
|
|
|
})
|
|
|
this.prizeList = res.data
|
|
|
this.total = res.data.length
|
|
|
- console.log(this.total);
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
uni.hideLoading();
|
|
@@ -68,13 +67,11 @@
|
|
|
return
|
|
|
}
|
|
|
this.actionIndex = index
|
|
|
- console.log(item, index);
|
|
|
},
|
|
|
|
|
|
confirmPrize() {
|
|
|
let _this = this
|
|
|
let item = _this.prizeList[_this.actionIndex]
|
|
|
- console.log(item);
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '确定选择该奖品吗?',
|