|
@@ -54,6 +54,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore :line="true" v-if="list.length>19" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到低了'" />
|
|
|
</view>
|
|
|
|
|
|
<!-- 中奖 -->
|
|
@@ -105,12 +106,14 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ status: 'nomore',//上拉刷新状态
|
|
|
list: [],
|
|
|
marketingId: '',
|
|
|
closeShow: false,
|
|
|
activityShow: false,
|
|
|
listData: {},
|
|
|
pagesNum: "",
|
|
|
+ total: 0,
|
|
|
}
|
|
|
},
|
|
|
onLoad(opthios) {
|
|
@@ -134,6 +137,7 @@
|
|
|
|
|
|
pageList() {
|
|
|
this.pageNum = 1
|
|
|
+ this.total = 0
|
|
|
this.list = []
|
|
|
this.getList()
|
|
|
},
|
|
@@ -142,7 +146,7 @@
|
|
|
title: '加载中'
|
|
|
});
|
|
|
this.loading = true
|
|
|
- $http.post(`/api/v1/mp/user/marketing/hit/prize/list`, {
|
|
|
+ $http.post(`/api/v1/mp/user/marketing/hit/prize/list?pageNum=${this.pageNum}&pageSize=20`, {
|
|
|
marketingId: this.marketingId,
|
|
|
}).then(res => {
|
|
|
uni.hideLoading();
|
|
@@ -153,6 +157,7 @@
|
|
|
item.prizePicUrl = env.filePublic + prizePicUrlArr[0] + '?imageView2/2/w/170'
|
|
|
item.avatar = env.filePublic + item.avatar + '?imageView2/2/w/170'
|
|
|
})
|
|
|
+ this.total = res.total
|
|
|
this.list = this.list.concat(res.rows)
|
|
|
}
|
|
|
}).catch(() => {
|
|
@@ -205,7 +210,15 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if(this.total < this.pageNum * 20) return ;
|
|
|
+ this.status = 'loading';
|
|
|
+ ++this.pageNum
|
|
|
+ if(this.total < this.pageNum * 20) this.status = 'nomore';
|
|
|
+ else this.status = 'loading';
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|