This commit is contained in:
zhaofang
2022-11-04 15:21:26 +08:00
parent 1e27665607
commit 26aedb9bd3
2 changed files with 24 additions and 3 deletions

View File

@@ -39,6 +39,9 @@
</view>
</view>
</view>
<view >
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
<u-popup :show="show">
<view class="cancel-pop">
<view class="btn" @click="cancel()">
@@ -65,6 +68,7 @@
}
}
},
loadStatus: 'more',
cancelIndex:0,
cancelIdx:0,
show:false,
@@ -85,6 +89,15 @@
}
},
onPullDownRefresh() {
if(this.tab == 1) {//关注我的
this.followMe.pageIndex ++;
this.getMyPage();
} else {//我关注的
this.follow.pageIndex ++;
this.getPage();
}
},
onLoad(options) {
this.$store.dispatch('GetUserInfo').then(rs => {
this.userInfo = rs;
@@ -138,9 +151,13 @@
getMyPage() {//关注我的,关注他的
this.followMe.aid = this.userInfo.aid;
let $this=this;
uni.showLoading({title:'加载中...'});
apiFollow.mypage(this.followMe).then(res=>{
setTimeout(function(){ uni.hideLoading() },100);
if(res.status== 200) {
$this.followMe.count = res.result.count;
if($this.followMe.pageIndex>=res.result.totalPages){
$this.loadStatus='noMore';
}
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
@@ -157,9 +174,13 @@
// this.page.pageIndex=this.follow.pageIndex;
// this.page.pageSize=this.follow.pageSize;
let $this=this;
uni.showLoading({title:'加载中...'});
apiFollow.page(this.follow).then(res=>{
setTimeout(function(){ uni.hideLoading() },100);
if(res.status== 200) {
$this.follow.count = res.result.count;
if($this.follow.pageIndex>=res.result.totalPages){
$this.loadStatus='noMore';
}
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})