From 63204f933e349118cee4636a2fd1da038e10d99c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 25 十二月 2023 19:01:36 +0800
Subject: [PATCH] modified: src/views/technology/document/index.vue modified: src/views/technology/routing/index.vue
---
src/views/common/qrCodeApp.vue | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/src/views/common/qrCodeApp.vue b/src/views/common/qrCodeApp.vue
index c50d1d4..75de8fe 100644
--- a/src/views/common/qrCodeApp.vue
+++ b/src/views/common/qrCodeApp.vue
@@ -18,8 +18,6 @@
</div>
</template>
<script>
-// 涓嬭浇鎻掍欢
-// cnpm install --save vue-qrcode-reader
// 寮曞叆
import { QrcodeStream } from "vue-qrcode-reader";
export default {
@@ -37,14 +35,14 @@
created() { },
methods: {
openCamera(){
- this.camera="front"
+ this.camera="rear"
},
//鍥炶皟鎵弿缁撴灉
onDecode(result) {
- console.log(result);
if (result !== "") {
- this.$emit("onDecode", result);
- alert(result)
+ this.result=result
+ this.$emit("ok",this.result)
+ this.cancelCode()
}
},
// 鐩告満鍙嶈浆
@@ -52,7 +50,7 @@
switch (this.camera) {
//鍓嶇疆
case 'front':
- //杞�
+ //杞悗缃�
this.camera = 'rear'
break
//鍙嶄箣
@@ -75,12 +73,7 @@
async onInit(promise) {
try {
const { capabilities } = await promise;
- console.log(
- "馃殌 ~ file: cameracomponent.vue:47 ~ onInit ~ capabilities",
- capabilities
- );
} catch (error) {
- // console.log()
this.$toast(error.name);
if (error.name === "NotAllowedError") {
this.error = "ERROR: 鎮ㄩ渶瑕佹巿浜堢浉鏈鸿闂潈闄�";
@@ -106,12 +99,7 @@
}
},
watch: {
- "result": {
- handler(newVal) {
- console.log('鎵弿鍊�' + newVal);
- },
- deep: true
- }
+
}
};
</script>
--
Gitblit v1.9.3