mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
加分页
This commit is contained in:
@@ -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=>{
|
||||
|
||||
Reference in New Issue
Block a user