From ecdac8a738f254db2b2ea28cbe3248f7a6a7eb2b Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期五, 06 三月 2020 16:18:27 +0800
Subject: [PATCH] 优化采购申请组件
---
WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js b/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
index f3e4d55..da63aea 100644
--- a/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
+++ b/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
@@ -327,18 +327,18 @@
video: true,
audio: false
};
- var video = document.getElementById('editApplicationKeyPhoto');
+ var editVideo = document.getElementById('editApplicationKeyPhoto');
var media = navigator.getUserMedia(constraints, function (stream) {
var url = window.URL || window.webkitURL;
//video.src = url ? url.createObjectURL(stream) : stream;
vc.component.editApplicationKeyInfo.mediaStreamTrack = typeof stream.stop === 'function' ? stream : stream.getTracks()[0];
try {
- video.src = url ? url.createObjectURL(stream) : stream;
+ editVideo.src = url ? url.createObjectURL(stream) : stream;
} catch (error) {
- video.srcObject = stream;
+ editVideo.srcObject = stream;
}
- video.play();
+ editVideo.play();
vc.component.editApplicationKeyInfo.videoPlaying = true;
}, function (error) {
console.log("ERROR");
@@ -351,10 +351,10 @@
_takeEditPhoto: function () {
if (vc.component.editApplicationKeyInfo.videoPlaying) {
var canvas = document.getElementById('editApplicationKeyCanvas');
- var video = document.getElementById('editApplicationKeyPhoto');
- canvas.width = video.videoWidth;
- canvas.height = video.videoHeight;
- canvas.getContext('2d').drawImage(video, 0, 0);
+ var takeEditVideo = document.getElementById('editApplicationKeyPhoto');
+ canvas.width = takeEditVideo.videoWidth;
+ canvas.height = takeEditVideo.videoHeight;
+ canvas.getContext('2d').drawImage(takeEditVideo, 0, 0);
var data = canvas.toDataURL('image/webp');
vc.component.editApplicationKeyInfo.photo = data;
//document.getElementById('photo').setAttribute('src', data);
--
Gitblit v1.8.0