mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #380 from gradido/350-3-QR-Hide-Code-scanner
Fix: QR Scanner Hide
This commit is contained in:
commit
8b64ca0704
@ -6,6 +6,7 @@
|
||||
<span class="alert-text h3 text-light" v-html="$t('form.attention')"></span>
|
||||
</b-alert>
|
||||
<b-card class="p-0 p-md-3" style="background-color: #ebebeba3 !important">
|
||||
<!--
|
||||
<b-alert show variant="secondary">
|
||||
<span class="alert-text" v-html="$t('form.scann_code')"></span>
|
||||
<b-col v-show="!scan" lg="12" class="text-right">
|
||||
@ -15,9 +16,9 @@
|
||||
</b-col>
|
||||
|
||||
<div v-if="scan">
|
||||
<!-- <b-row>
|
||||
<b-row>
|
||||
<qrcode-capture @detect="onDetect" capture="user" ></qrcode-capture>
|
||||
</b-row> -->
|
||||
</b-row>
|
||||
|
||||
<qrcode-stream class="mt-3" @decode="onDecode" @detect="onDetect"></qrcode-stream>
|
||||
|
||||
@ -39,6 +40,7 @@
|
||||
</b-alert>
|
||||
</div>
|
||||
</b-alert>
|
||||
-->
|
||||
|
||||
<validation-observer v-slot="{ handleSubmit }" ref="formValidator">
|
||||
<b-form
|
||||
@ -47,11 +49,11 @@
|
||||
@reset="onReset"
|
||||
v-if="show"
|
||||
>
|
||||
<br />
|
||||
<div>
|
||||
<!-- <div>
|
||||
<qrcode-drop-zone id="input-0" v-model="form.img"></qrcode-drop-zone>
|
||||
</div>
|
||||
<br />
|
||||
-->
|
||||
<div>
|
||||
<b-col class="text-left p-3 p-sm-1">{{ $t('form.receiver') }}</b-col>
|
||||
|
||||
@ -190,15 +192,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { QrcodeStream, QrcodeDropZone } from 'vue-qrcode-reader'
|
||||
// import { QrcodeStream, QrcodeDropZone } from 'vue-qrcode-reader'
|
||||
import { BIcon } from 'bootstrap-vue'
|
||||
import communityAPI from '../../../apis/communityAPI.js'
|
||||
|
||||
export default {
|
||||
name: 'GddSent',
|
||||
components: {
|
||||
QrcodeStream,
|
||||
QrcodeDropZone,
|
||||
// QrcodeStream,
|
||||
// QrcodeDropZone,
|
||||
BIcon,
|
||||
},
|
||||
props: {
|
||||
@ -207,7 +209,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
scan: false,
|
||||
// scan: false,
|
||||
show: true,
|
||||
form: {
|
||||
img: '',
|
||||
@ -229,15 +231,15 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
toggle() {
|
||||
this.scan = !this.scan
|
||||
},
|
||||
async onDecode(decodedString) {
|
||||
const arr = JSON.parse(decodedString)
|
||||
this.form.email = arr[0].email
|
||||
this.form.amount = arr[0].amount
|
||||
this.scan = false
|
||||
},
|
||||
// toggle() {
|
||||
// this.scan = !this.scan
|
||||
// },
|
||||
// async onDecode(decodedString) {
|
||||
// const arr = JSON.parse(decodedString)
|
||||
// this.form.email = arr[0].email
|
||||
// this.form.amount = arr[0].amount
|
||||
// this.scan = false
|
||||
// },
|
||||
async onSubmit() {
|
||||
// event.preventDefault()
|
||||
this.ajaxCreateData.email = this.form.email
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user