Minor changes to CacheEnd
This commit is contained in:
parent
6f6fa8a0b0
commit
582edef020
@ -25,6 +25,9 @@
|
||||
data() {
|
||||
return {
|
||||
reward: false,
|
||||
cacheID: "",
|
||||
cacheName: "",
|
||||
rankingPoints: "",
|
||||
end1: "Gut gemacht, Du hast alle Stationen dieses Cache gefunden. Dir wurden ",
|
||||
end2: " Punkte gutgeschrieben." //TODO Punkte wirklich gutschreiben, ggf. Cache auf erledigt setzen
|
||||
}
|
||||
@ -34,6 +37,9 @@
|
||||
return localStorage.getItem('userToken'); //TODO Methode umschreiben --> funktioniert das?
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData();
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.$axios.get('/api/allCaches')
|
||||
@ -43,10 +49,11 @@
|
||||
console.log(this.data);
|
||||
console.log(response.data);
|
||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||
this.data.cacheName = cache.name;
|
||||
this.data.cachePoints = cache.rankingPoints;
|
||||
this.cacheName = cache.name;
|
||||
this.rankingPoints = cache.rankingPoints;
|
||||
this.cacheID = this.$route.params.cache;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -55,6 +55,11 @@ const routes = [
|
||||
component: () => import("layouts/MyLayout.vue"),
|
||||
children: [{ path: "", component: () => import("pages/CacheStart.vue") }]
|
||||
},
|
||||
{
|
||||
path: "/CacheEnd/:cache/",
|
||||
component: () => import("layouts/MyLayout.vue"),
|
||||
children: [{ path: "", component: () => import("pages/CacheEnd.vue") }]
|
||||
},
|
||||
{
|
||||
path: "/profile/",
|
||||
component: () => import("layouts/MyLayout.vue"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user