This commit is contained in:
zhaofang
2022-11-16 16:20:20 +08:00
parent a7e65f8c26
commit 8e9e7080f0
2 changed files with 13 additions and 13 deletions

View File

@@ -91,12 +91,14 @@
pageIndex:1,
pageSize:10,
list:[],
count:0
},
follow:{
aid:'',
pageIndex:1,
pageSize:10,
list:[],
count:0
}
}
@@ -105,10 +107,10 @@
this.onReachBottom();
},
onReachBottom() {
if(this.tab == 1) {//关注我的
if(this.tab == 1 && this.followMe.list.length<this.followMe.count) {//关注我的
this.followMe.pageIndex ++;
this.getMyPage();
} else {//我关注的
} else if(this.tab == 2 && this.follow.list.length<this.follow.count){//我关注的
this.follow.pageIndex ++;
this.getPage();
}
@@ -159,8 +161,10 @@
apiFollow.save(item.userFollow.aid).then(res=>{
if(res.status == 200) {
$this.followMe.list[index].has = true;
// 手动把关注成功的数据push进我关注的列表
} else {
this.$message.error(res.message);
// this.$message.error(res.message);
}
})
},
@@ -174,9 +178,7 @@
apiFollow.mypage(this.followMe).then(res=>{
setTimeout(function(){ uni.hideLoading() },100);
if(res.status== 200) {
if($this.followMe.pageIndex>=res.result.totalPages){
$this.loadStatus='noMore';
}
this.followMe.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
@@ -194,9 +196,7 @@
apiFollow.page(this.follow).then(res=>{
setTimeout(function(){ uni.hideLoading() },100);
if(res.status== 200) {
if($this.follow.pageIndex>=res.result.totalPages){
$this.loadStatus='noMore';
}
this.follow.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})