|
@@ -43,9 +43,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
<view class="flex empty" v-if="!list.length && !loading && triggerStatus == 0">
|
|
|
<view class="center">
|
|
|
<image class="center-img"
|
|
@@ -61,6 +59,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
|
|
|
<custom-tab-bar :activeValue="'activity'" />
|
|
|
</view>
|
|
|
</template>
|
|
@@ -71,6 +70,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ status: 'nomore',//上拉刷新状态
|
|
|
list: [],
|
|
|
statusArr: [{
|
|
|
name: '参与抽奖'
|
|
@@ -85,6 +85,8 @@
|
|
|
}],
|
|
|
triggerStatus: 0,
|
|
|
userInfo: '',
|
|
|
+ pageNum: 1,
|
|
|
+ total: 0,
|
|
|
}
|
|
|
},
|
|
|
onLoad(opthios) {
|
|
@@ -126,6 +128,8 @@
|
|
|
this.pageList()
|
|
|
},
|
|
|
pageList() {
|
|
|
+ this.pageNum = 1
|
|
|
+ this.total = 0
|
|
|
this.list = []
|
|
|
this.getList()
|
|
|
},
|
|
@@ -134,7 +138,7 @@
|
|
|
title: '加载中'
|
|
|
});
|
|
|
this.loading = true
|
|
|
- $http.post(`/api/v1/mp/user/marketing/list?pageNum=1&pageSize=30`, {
|
|
|
+ $http.post(`/api/v1/mp/user/marketing/list?pageNum=${this.pageNum}&pageSize=5`, {
|
|
|
triggerStatus: this.triggerStatus,
|
|
|
}).then(res => {
|
|
|
uni.hideLoading();
|
|
@@ -178,7 +182,15 @@
|
|
|
// type: 1, }
|
|
|
query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if(this.total < this.pageNum * 5) return ;
|
|
|
+ this.status = 'loading';
|
|
|
+ ++this.pageNum
|
|
|
+ if(this.total < this.pageNum * 5) this.status = 'nomore';
|
|
|
+ else this.status = 'loading';
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -200,7 +212,7 @@
|
|
|
}
|
|
|
|
|
|
.list {
|
|
|
- padding: 120rpx 20rpx 100rpx;
|
|
|
+ padding: 120rpx 20rpx 0;
|
|
|
|
|
|
&-view {
|
|
|
text-align: center;
|
|
@@ -232,6 +244,7 @@
|
|
|
float: left;
|
|
|
|
|
|
.time {
|
|
|
+ font-size: 30rpx;
|
|
|
color: #333333;
|
|
|
}
|
|
|
|
|
@@ -241,7 +254,7 @@
|
|
|
}
|
|
|
|
|
|
.timetwo {
|
|
|
- width: 430rpx;
|
|
|
+ width: 420rpx;
|
|
|
background: rgba(249, 130, 44, 0.08);
|
|
|
margin-top: 10rpx;
|
|
|
border: 2rpx solid #F9822C;
|