<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
status: 'loadmore',
iconType: 'flower',
// 加载前值为loadmore,加载中为loading,没有数据为nomore
loadText: {
loadmore:'上拉加载更多',
loading:'努力加载中',
nomore:'没有更多了'
},
schoolListCont_api(){
this.status='loading';
schoolListCont({}).then(res=>{
if(res.success&&res.data){
this.showonshowFlag=res.data.length==0 ? true :false;
this.listAchool=this.listAchool.concat(res.data);
if(Number(res.totalDatas)>this.listAchool.length ){
// 没有加载完
this.status='loadmore';
this.isloadFalg=true;
}else{
// 加载完了
this.isloadFalg=false;
this.status='nomore';
}
}else{
this.showonshowFlag=false;
this.listAchool=[];
this.isloadFalg=false
}
})
}else{
uni.showToast({
title:'未获取到机构orgId',
icon:'none'
})
}
},
|
请发表评论