finished getPersonalRanking()
This commit is contained in:
parent
2a16638278
commit
a56d2f3c22
@ -290,8 +290,8 @@
|
|||||||
this.$store.commit('auth/SET_AUTHENTICATED');
|
this.$store.commit('auth/SET_AUTHENTICATED');
|
||||||
this.$store.commit('auth/SET_USER');
|
this.$store.commit('auth/SET_USER');
|
||||||
this.email = JSON.parse(localStorage.getItem('userMail'));
|
this.email = JSON.parse(localStorage.getItem('userMail'));
|
||||||
this.data[1].userData = this.email;
|
this.data[0].userData = this.email;
|
||||||
//this.getPersonalRanking();
|
this.getPersonalRanking();
|
||||||
this.getTeamData();
|
this.getTeamData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -300,17 +300,11 @@
|
|||||||
return re.test(String(email).toLowerCase());
|
return re.test(String(email).toLowerCase());
|
||||||
},
|
},
|
||||||
getPersonalRanking() {
|
getPersonalRanking() {
|
||||||
let token;
|
let name = this.email;
|
||||||
if (localStorage.getItem('userToken')) {
|
this.$axios.get('/api/hello', {params: {name}})
|
||||||
token = JSON.parse(localStorage.getItem('userToken')).token;
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$axios.get('/api/getRankingPlace', {params: {token}})
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.userRanking = response.data;
|
this.userRanking = response.data;
|
||||||
console.log(response.data);
|
this.data[1].userData = this.userRanking;
|
||||||
this.data[2].userData = this.userRanking;
|
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.handleError(error);
|
this.handleError(error);
|
||||||
})
|
})
|
||||||
@ -335,9 +329,9 @@
|
|||||||
this.currentTeamStatus = response.data.teamStatus;
|
this.currentTeamStatus = response.data.teamStatus;
|
||||||
this.teamRanking = response.data.teamRanking;
|
this.teamRanking = response.data.teamRanking;
|
||||||
}
|
}
|
||||||
this.data[3].userData = this.teamName;
|
this.data[2].userData = this.teamName;
|
||||||
this.dropDownSelectedItem = this.teamName;
|
this.dropDownSelectedItem = this.teamName;
|
||||||
this.data[4].userData = this.teamRanking;
|
this.data[3].userData = this.teamRanking;
|
||||||
console.log("getTeam: " + response);
|
console.log("getTeam: " + response);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.handleError(error);
|
this.handleError(error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user