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>
|
<p class="text-h5">{{ end1 + rankingPoints + end2 }}</p>
|
||||||
|
|
||||||
<div class="column q-gutter-y-md">
|
<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-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Belohnung" @click="reward = true" />
|
||||||
<q-dialog v-model="reward">
|
<q-dialog v-model="reward">
|
||||||
<q-card>
|
<q-card>
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
code: "",
|
//code: "",
|
||||||
cache: null,
|
cache: null,
|
||||||
data: {
|
data: {
|
||||||
cacheId: 22,
|
cacheId: 22,
|
||||||
@ -165,8 +165,8 @@
|
|||||||
setParams() {
|
setParams() {
|
||||||
console.log("setParams: ");
|
console.log("setParams: ");
|
||||||
let params = {};
|
let params = {};
|
||||||
params.cacheID = this.code.split('/')[0];
|
params.cacheID = this.result.split('/')[0];
|
||||||
params.stationID = this.code.split('/')[1];
|
params.stationID = this.result.split('/')[1];
|
||||||
params.durchgefuehrterCacheID = this.cacheID;
|
params.durchgefuehrterCacheID = this.cacheID;
|
||||||
console.log(params.cacheID + " und " + params.stationID);
|
console.log(params.cacheID + " und " + params.stationID);
|
||||||
if (localStorage.getItem('userToken')) {
|
if (localStorage.getItem('userToken')) {
|
||||||
@ -198,7 +198,11 @@
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("resolve(true)");
|
console.log("resolve(true)");
|
||||||
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) => {
|
}).catch((error) => {
|
||||||
console.log("resolve(false)");
|
console.log("resolve(false)");
|
||||||
// Error
|
// Error
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user