This commit is contained in:
rchrist 2019-04-30 15:28:57 +02:00
parent 247e762289
commit fad27b0e35

View File

@ -301,7 +301,7 @@
this.data[0].userData = this.userName;
this.email = JSON.parse(localStorage.getItem('userMail'));
this.data[1].userData = this.email;
this.userRanking = "1234";
this.getPersonalRanking();
this.data[2].userData = this.userRanking;
this.teamName = "BuGa19Community";
this.data[3].userData = this.teamName;
@ -345,9 +345,9 @@
return re.test(String(email).toLowerCase());
},
getPersonalRanking() {
const name = JSON.parse(localStorage.getItem('userToken')).name;
const name = JSON.parse(localStorage.getItem('userToken')).token;
console.log(JSON.parse(localStorage.getItem('userToken')).name);
this.$axios.get('/api/hello', {params: {name}})
this.$axios.get('/api/getRankingPlace', {params: {name}})
.then((response) => {
this.userRanking = response.data;
console.log(response.data);
@ -375,7 +375,7 @@
})
},
getTeamData() {
const userName = {name: JSON.parse(localStorage.getItem('userToken')).name};
const userName = {name: JSON.parse(localStorage.getItem('userToken')).token};
this.$axios.get('/api/getTeam', {params: userName})
.then(response => {
console.log("getTeam: " + response);