food/src/views/Scan.vue

20 lines
559 B
Vue
Raw Normal View History

2017-09-19 02:41:00 +02:00
<template>
<v-container fluid>
2017-09-19 02:41:00 +02:00
<h2>Let's scan something!</h2>
<p>Loading scanning app</p>
</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>