修改我邀请列表分页报错
This commit is contained in:
parent
ddc04eed65
commit
89b1af7926
@ -75,29 +75,34 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// ],
|
// ],
|
||||||
invitationList: [],
|
invitationList: [],
|
||||||
|
token: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 计算我的助力分页
|
// 计算我的助力分页
|
||||||
logCurrentPageItems() {
|
logCurrentPageItems() {
|
||||||
if(this.invitationList.length == 0){
|
if(this.invitationList !== undefined && this.invitationList.length > 0){
|
||||||
|
let start = (this.logCurrentPage - 1) * this.logPageSize;
|
||||||
|
let end = start + this.logPageSize;
|
||||||
|
return this.invitationList.slice(start, end)
|
||||||
|
} else {
|
||||||
return this.invitationList
|
return this.invitationList
|
||||||
}
|
}
|
||||||
let start = (this.logCurrentPage - 1) * this.logPageSize;
|
|
||||||
let end = start + this.logPageSize;
|
|
||||||
return this.invitationList.slice(start, end)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMyInvitationData();
|
this.token = getToken();
|
||||||
|
if(this.token) {
|
||||||
|
this.getMyInvitationData();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 我的邀请列表
|
// 我的邀请列表
|
||||||
async getMyInvitationData() {
|
async getMyInvitationData() {
|
||||||
let token = getToken();
|
|
||||||
let res = await this.$axios.get(process.env.VUE_APP_API_URL+"/api/activity/invite_list", {
|
let res = await this.$axios.get(process.env.VUE_APP_API_URL+"/api/activity/invite_list", {
|
||||||
params: "",
|
params: "",
|
||||||
headers: { Authorization: `Bearer ${token}` }
|
headers: { Authorization: `Bearer ${this.token}` }
|
||||||
});
|
});
|
||||||
// ToDo
|
// ToDo
|
||||||
this.invitationList = res.data.data
|
this.invitationList = res.data.data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user