From 5f863174c87662b967d4c5e123ea0cd3e6e11ebb Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 19 五月 2023 14:36:57 +0800
Subject: [PATCH] 34
---
src/views/login/index.vue | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index ff1f3c4..8be8141 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -26,7 +26,12 @@
import { confingInfoStore } from "@/stores/StoresConfing";
const msg = ref<string>("没识别到人脸...");
-
+const props = defineProps({
+ dialogVisible:{
+ type:Boolean,
+ default:false
+ }
+})
let trackerTask: any = null;
const inputCode=ref('')
const inputRef = ref()
@@ -57,9 +62,12 @@
thisContext.drawImage(myVideo, 0,0, 250, 200);
imgSrc = myCanvas?.toDataURL('image/png');
// 转文件
- base64toFile(imgSrc)
+ // 识别框显示才能到传阿里云识别
+ if(props.dialogVisible){
+ base64toFile(imgSrc)
+ }
setTimeout(() => {
- console.log('监测到人脸后1s')
+ console.log('监测到人脸后3s')
trackerTask.run();
}, 3000);
// @ts-ignore
--
Gitblit v1.8.0