|
@@ -83,7 +83,7 @@
|
|
|
|
|
|
<!-- 盲票奖品数量、概率 -->
|
|
<!-- 盲票奖品数量、概率 -->
|
|
<view class="prize-total">
|
|
<view class="prize-total">
|
|
- <view class="prize-total-num">共{{ prizeList.length }}款</view>
|
|
|
|
|
|
+ <view class="prize-total-num">共{{ total }}款</view>
|
|
<!-- 中奖概率 -->
|
|
<!-- 中奖概率 -->
|
|
<view class="prize-total-chance flex">
|
|
<view class="prize-total-chance flex">
|
|
<view class="prize-total-chance-content flex" v-for="(item, index) in info.ticketAwardsLabelList">
|
|
<view class="prize-total-chance-content flex" v-for="(item, index) in info.ticketAwardsLabelList">
|
|
@@ -108,6 +108,7 @@
|
|
<image :src="item.awardsLabelPicUrl" />
|
|
<image :src="item.awardsLabelPicUrl" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-loadmore :line="true" v-if="prizeList.length>10" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="footer-fixed" v-if="btnFixed">
|
|
<view class="footer-fixed" v-if="btnFixed">
|
|
@@ -137,6 +138,9 @@
|
|
boxId: '',
|
|
boxId: '',
|
|
picUrlArr: [],
|
|
picUrlArr: [],
|
|
info: {},
|
|
info: {},
|
|
|
|
+ status: 'nomore',//上拉刷新状态
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ total: 0,
|
|
prizeList: [],
|
|
prizeList: [],
|
|
|
|
|
|
payShow: false,
|
|
payShow: false,
|
|
@@ -219,7 +223,7 @@
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
});
|
|
});
|
|
- $http.post('/api/v1/mp/user/mall/ticket/detail', {
|
|
|
|
|
|
+ $http.post('/api/v1/mp/user/mall/ticket/detail/new', {
|
|
boxId: this.boxId,
|
|
boxId: this.boxId,
|
|
noToken: true
|
|
noToken: true
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -232,16 +236,27 @@
|
|
return { ...item, picUrl: env.filePublic + item.picUrl }
|
|
return { ...item, picUrl: env.filePublic + item.picUrl }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- let prizeList = res.data.prizeList
|
|
|
|
|
|
+ this.pageNum = 1
|
|
|
|
+ this.total = 0
|
|
|
|
+ this.prizeList = []
|
|
|
|
+ this.getPrizeList()
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getPrizeList() {
|
|
|
|
+ $http.post(`/api/v1/mp/user/ticket/prize/list/${this.boxId}?pageNum=${this.pageNum}&pageSize=10`,{}).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ let prizeList = res.rows
|
|
prizeList.forEach(item => {
|
|
prizeList.forEach(item => {
|
|
item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/375'
|
|
item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/375'
|
|
item.awardsLabelPicUrl = env.filePublic + item.awardsLabelPicUrl
|
|
item.awardsLabelPicUrl = env.filePublic + item.awardsLabelPicUrl
|
|
})
|
|
})
|
|
- this.prizeList = prizeList
|
|
|
|
|
|
+ this.total = res.total
|
|
|
|
+ this.prizeList = this.prizeList.concat(prizeList)
|
|
this.prizeInfo = this.prizeList[this.prizeIndex]
|
|
this.prizeInfo = this.prizeList[this.prizeIndex]
|
|
}
|
|
}
|
|
- }).catch(() => {
|
|
|
|
- uni.hideLoading();
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -368,7 +383,17 @@
|
|
query: `boxId=${ this.info.boxId }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
|
|
query: `boxId=${ this.info.boxId }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
|
|
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ if(this.total < this.pageNum * 10) return ;
|
|
|
|
+ this.status = 'loading';
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ ++this.pageNum
|
|
|
|
+ if(this.total < this.pageNum * 10) this.status = 'nomore';
|
|
|
|
+ else this.status = 'loading';
|
|
|
|
+ this.getPrizeList()
|
|
|
|
+ // }, 2000)
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -630,7 +655,7 @@
|
|
|
|
|
|
// 盲票奖品列表
|
|
// 盲票奖品列表
|
|
.prize-list {
|
|
.prize-list {
|
|
- padding: 0 34rpx;
|
|
|
|
|
|
+ padding: 0 34rpx 70rpx;
|
|
|
|
|
|
&-item {
|
|
&-item {
|
|
position: relative;
|
|
position: relative;
|