From e9ef9bfe411bda655f6231f3213cb09039b9dbb7 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期一, 27 十一月 2023 09:22:21 +0800
Subject: [PATCH] 更新识别逻辑 定时

---
 src/views/login/index.vue |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 025c168..1c24d2a 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import { computed, onMounted, ref } from "vue";
 import {base64toFile} from '@/samples/faceApi'
-import { formatDate } from "@/utils/formatTime";
+import { formatDate ,jgTime} from "@/utils/formatTime";
 import { confingInfoStore } from "@/stores/StoresConfing";
 
 const msg = ref<string>("没识别到人脸...");
@@ -13,6 +13,7 @@
 // 标识用的画布
 const myCanvas = ref<HTMLCanvasElement | null>(null);
 let imgSrc:'';
+let chuansongTime;
 // 实例人脸检查器
 const myTracker: any = new tracking.ObjectTracker("face");
 myTracker.setInitialScale(4);
@@ -37,6 +38,8 @@
     // 转文件
     // 识别框显示才能到传阿里云识别
     if(dialogVisible.value){
+      // if(new Date())
+      // chuansongTime=new Date()
       base64toFile(imgSrc)
     }
     setTimeout(() => {
@@ -55,7 +58,10 @@
   // 触发人脸检查器
   console.log('人脸识别初始化')
   const  isUseFaceRecogService = confingInfoStore().confingInfo.isUseFaceRecogService
-  console.log('人脸识别',isUseFaceRecogService)
+  // console.log('人脸识别',isUseFaceRecogService)
+  
+  let jg= jgTime(new Date(),new Date())
+  console.log(jg)
   setInterval(function () {
     date.value= formatDate(new Date(),'YYYY-mm-dd HH:MM')
   }, 1000)

--
Gitblit v1.8.0