|
@@ -82,6 +82,7 @@
|
|
|
<view class="btnTwo">已兑换</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到低了'" />
|
|
|
</view>
|
|
|
<view class="flex empty" v-if="!list.length && !loading">
|
|
|
<view class="center">
|
|
@@ -113,6 +114,7 @@
|
|
|
<view class="btn-title" v-else>查看详情</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到低了'" />
|
|
|
</view>
|
|
|
<view class="flex empty" v-if="!list.length && !loading">
|
|
|
<view class="center">
|
|
@@ -121,7 +123,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="prize-action">
|
|
|
<!-- 实物商品提货 -->
|
|
|
<view class="flex prize-action-goods" v-if="state == 0 && statusIndex == 1">
|
|
@@ -181,6 +182,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ status: 'nomore',//上拉刷新状态
|
|
|
loading: false,
|
|
|
stateArr: [{
|
|
|
name: ' 实物商品',
|
|
@@ -280,6 +282,7 @@
|
|
|
let picUrlArr = item.picUrl.split(',')
|
|
|
item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
|
|
|
})
|
|
|
+ _this.total = res.total
|
|
|
_this.list = _this.list.concat(res.rows)
|
|
|
}
|
|
|
}).catch(() => {
|
|
@@ -494,10 +497,10 @@
|
|
|
},
|
|
|
|
|
|
couponNum() {
|
|
|
- $http.post(`/api/v1/mp/user/mine/prize/list?pageNum=1&pageSize=10`, {
|
|
|
+ $http.post(`/api/v1/mp/user/mine/prize/list?pageNum=1&pageSize=20`, {
|
|
|
|
|
|
}).then(res => {
|
|
|
- $http.post(`/api/v1/mp/user/mine/coupon/list?pageNum=1&pageSize=10`, {
|
|
|
+ $http.post(`/api/v1/mp/user/mine/coupon/list?pageNum=1&pageSize=20`, {
|
|
|
status: 1
|
|
|
}).then(data => {
|
|
|
if (res.code == 0) {
|
|
@@ -562,15 +565,14 @@
|
|
|
},
|
|
|
|
|
|
onReachBottom() {
|
|
|
- // 判断是否有数据
|
|
|
- if (this.total > this.pageNum * 20) {
|
|
|
- setTimeout(() => {
|
|
|
- ++this.pageNum
|
|
|
- this.statusIndex == 3 && this.state == 0 ? this.getListTwo():this.getList()
|
|
|
- }, 500)
|
|
|
- } else {
|
|
|
- uni.$u.toast('已经到底了')
|
|
|
- }
|
|
|
+ if(this.total < this.pageNum * 20) return ;
|
|
|
+ this.status = 'loading';
|
|
|
+ // setTimeout(() => {
|
|
|
+ ++this.pageNum
|
|
|
+ if(this.total < this.pageNum * 20) this.status = 'nomore';
|
|
|
+ else this.status = 'loading';
|
|
|
+ this.statusIndex == 3 && this.state == 0 ? this.getListTwo():this.getList()
|
|
|
+ // }, 2000)
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -828,7 +830,7 @@
|
|
|
}
|
|
|
|
|
|
&-coupon {
|
|
|
- padding: 30rpx 40rpx;
|
|
|
+ padding: 24rpx 40rpx;
|
|
|
|
|
|
.title {
|
|
|
margin-right: 10rpx;
|