Ver código fonte

人脸识别功能修改

DESKTOP-B78GIPM\admin 2 anos atrás
pai
commit
a603c459bf
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      pages/face/index.vue

+ 2 - 2
pages/face/index.vue

@@ -253,7 +253,7 @@
 					// 把当前视频帧内容渲染到canvas上
 					// ctx.drawImage(document.createElement('canvas'), 0, 0, 520, 520);
 					// 修改后代码 将 html2Cvs 修改为 (window.html2Cvs || html2Cvs)
-					(window.html2Cvs || html2Cvs)(document.querySelector('video'), {
+					html2Cvs(document.querySelector('video'), {
 						backgroundColor: null,
 						useCORS: true
 					}).then(cvs => {
@@ -302,7 +302,7 @@
 					},
 					method: 'POST',
 				}).then(res => {
-					console.log(res)
+					console.log(res, 'res')
 					if(res.data.length != 0){
 						if(res.data[0].name != null){
 							// this.type = 3