加分页

This commit is contained in:
lmj
2022-10-15 11:46:55 +08:00
parent 89dd6f7a6e
commit 2b48fca98b

View File

@@ -135,17 +135,7 @@ import apiUser from "@/api/system/user.js";
this.pageId = this.$xpage.getHomeId(this.$route);
},
methods:{
handleSizeChange(val) {
this.page.pageSize = val;
this.page.pageIndex = 1;
this.getPage()
this.getMyPage()
},
handleCurrentChange(val) {
this.page.pageIndex = val;
this.getPage()
this.getMyPage()
},
cancel(item) {
apiFollow.remove(item.followId).then(res=>{
if(res.status == 200) {
@@ -158,19 +148,36 @@ import apiUser from "@/api/system/user.js";
tagTab(num) {
this.active = num;
if(num == 1) {
if(this.followList.length==0){
this.getPage()
}
// if(this.followList.length==0){
// this.getPage()
// }
} else {
if(this.mypageList.length==0){
this.getMyPage()
}
// if(this.mypageList.length==0){
// this.getMyPage()
// }
}
},
handleSizeChange(val) {
this.page.pageSize = val;
this.page.pageIndex = 1;
this.getPage()
this.getMyPage()
},
handleCurrentChange(val) {
this.page.pageIndex = val;
this.getPage()
this.getMyPage()
},
getMyPage() {//关注我的,关注他的
this.page.aid = this.pageId;
apiFollow.mypage(this.page).then(res=>{
this.page.count = res.result.count;
if(res.status== 200) {
this.page.count = res.result.count;
res.result.list.forEach(item=>{
@@ -185,6 +192,7 @@ import apiUser from "@/api/system/user.js";
getPage() { //我关注的,他关注的
this.page.aid = this.pageId;
apiFollow.page(this.page).then(res=>{
this.page.count = res.result.count;
if(res.status== 200) {
this.page.count = res.result.count;
res.result.list.forEach(item=>{