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