34
chenyc
2023-05-19 5f863174c87662b967d4c5e123ea0cd3e6e11ebb
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