<view class="interval" v-if="flag">------我是有底线的------</view>
methods: {
getStudyList(callBack){
let params = {
safeTypeId: this.safeTypeId,
current: this.current
}
Home.studyData(params).then(res=>{
this.total = res.data.total
this.filter(res.data.records);
this.contents = [...this.contents, ...res.data.records]
callBack && callBack()
})
}
}
onReachBottom() {
if(this.contents.length>=this.total){
this.flag = true
}else{
this.current++
this.getStudyList()
}
},
onPullDownRefresh () {
this.current = 1
this.contents = []
this.flag = false
this.getStudyList(()=>{
uni.stopPullDownRefresh();
})
}