2017-09-19 02:41:00 +02:00
|
|
|
<template>
|
2017-09-22 02:19:46 +02:00
|
|
|
<v-container fluid>
|
2017-09-19 02:41:00 +02:00
|
|
|
<h2>Let's scan something!</h2>
|
|
|
|
|
|
|
|
<p>Loading scanning app…</p>
|
2017-09-22 02:19:46 +02:00
|
|
|
</v-container>
|
2017-09-19 02:41:00 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
mounted() {
|
|
|
|
// TODO: Rework this
|
|
|
|
const host = encodeURIComponent(`${window.location.protocol}//${window.location.host}`);
|
|
|
|
let href = this.$router.resolve({ name: 'Product', params: { barcode: 'CODE' } }).href;
|
|
|
|
href = encodeURIComponent(href.replace('CODE', '{CODE}'));
|
|
|
|
window.location = `zxing://scan/?ret=${host}${href}`;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|