mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
提交
This commit is contained in:
@@ -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:''}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user