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