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