redirect finished station to CacheEnd. not tested
This commit is contained in:
parent
33e6b6a35e
commit
57c5c7c39a
@ -5,7 +5,7 @@
|
||||
<p class="text-h5">{{ end1 + rankingPoints + end2 }}</p>
|
||||
|
||||
<div class="column q-gutter-y-md">
|
||||
<q-btn unelevated v-if="IsLoggedIn" color="primary" label="Zur Rangliste" to="/ranking/"/>
|
||||
<q-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Rangliste" to="/ranking/"/>
|
||||
<q-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Belohnung" @click="reward = true" />
|
||||
<q-dialog v-model="reward">
|
||||
<q-card>
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
code: "",
|
||||
//code: "",
|
||||
cache: null,
|
||||
data: {
|
||||
cacheId: 22,
|
||||
@ -165,8 +165,8 @@
|
||||
setParams() {
|
||||
console.log("setParams: ");
|
||||
let params = {};
|
||||
params.cacheID = this.code.split('/')[0];
|
||||
params.stationID = this.code.split('/')[1];
|
||||
params.cacheID = this.result.split('/')[0];
|
||||
params.stationID = this.result.split('/')[1];
|
||||
params.durchgefuehrterCacheID = this.cacheID;
|
||||
console.log(params.cacheID + " und " + params.stationID);
|
||||
if (localStorage.getItem('userToken')) {
|
||||
@ -198,7 +198,11 @@
|
||||
.then((response) => {
|
||||
console.log("resolve(true)");
|
||||
resolve(true);
|
||||
this.$router.push({path: `/station/${params.cacheID}/${params.stationID}`});
|
||||
if (response.data.cache_acces_definition === 0) {
|
||||
this.$router.push({path: `/station/${params.cacheID}/${params.stationID}`});
|
||||
} else if (response.data.cache_acces_definition === 1) {
|
||||
this.$router.push({path: `/CacheEnd/${params.cacheID}`});
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log("resolve(false)");
|
||||
// Error
|
||||
|
||||
Loading…
Reference in New Issue
Block a user