mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +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);
|
this.pageId = this.$xpage.getHomeId(this.$route);
|
||||||
},
|
},
|
||||||
methods:{
|
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) {
|
cancel(item) {
|
||||||
apiFollow.remove(item.followId).then(res=>{
|
apiFollow.remove(item.followId).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
@@ -158,19 +148,36 @@ import apiUser from "@/api/system/user.js";
|
|||||||
tagTab(num) {
|
tagTab(num) {
|
||||||
this.active = num;
|
this.active = num;
|
||||||
if(num == 1) {
|
if(num == 1) {
|
||||||
if(this.followList.length==0){
|
|
||||||
this.getPage()
|
this.getPage()
|
||||||
}
|
|
||||||
|
// if(this.followList.length==0){
|
||||||
|
// this.getPage()
|
||||||
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(this.mypageList.length==0){
|
|
||||||
this.getMyPage()
|
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() {//关注我的,关注他的
|
getMyPage() {//关注我的,关注他的
|
||||||
this.page.aid = this.pageId;
|
this.page.aid = this.pageId;
|
||||||
apiFollow.mypage(this.page).then(res=>{
|
apiFollow.mypage(this.page).then(res=>{
|
||||||
|
this.page.count = res.result.count;
|
||||||
|
|
||||||
if(res.status== 200) {
|
if(res.status== 200) {
|
||||||
this.page.count = res.result.count;
|
this.page.count = res.result.count;
|
||||||
res.result.list.forEach(item=>{
|
res.result.list.forEach(item=>{
|
||||||
@@ -185,6 +192,7 @@ import apiUser from "@/api/system/user.js";
|
|||||||
getPage() { //我关注的,他关注的
|
getPage() { //我关注的,他关注的
|
||||||
this.page.aid = this.pageId;
|
this.page.aid = this.pageId;
|
||||||
apiFollow.page(this.page).then(res=>{
|
apiFollow.page(this.page).then(res=>{
|
||||||
|
this.page.count = res.result.count;
|
||||||
if(res.status== 200) {
|
if(res.status== 200) {
|
||||||
this.page.count = res.result.count;
|
this.page.count = res.result.count;
|
||||||
res.result.list.forEach(item=>{
|
res.result.list.forEach(item=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user