视频摄像头扫码优化
parent
328fc719b2
commit
9ab8251cda
|
|
@ -1879,10 +1879,12 @@ a.input-clearout-submit:focus > i {
|
|||
}
|
||||
}
|
||||
#common-video-scan-popup .scanner video {
|
||||
transform: rotateY(180deg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#common-video-scan-popup .scanner video.picture-reverse {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
#common-video-scan-popup .video-scan-switch-camera-submit {
|
||||
position: absolute;
|
||||
left: calc(50% - 12px);
|
||||
|
|
|
|||
|
|
@ -4689,6 +4689,7 @@ $(function()
|
|||
var $video_scan_popup = $('#common-video-scan-popup');
|
||||
var $continue_submit = $video_scan_popup.find('.video-scan-continue-submit');
|
||||
var $switch_submit = $video_scan_popup.find('.video-scan-switch-camera-submit');
|
||||
var $video_scan = $video_scan_popup.find('.scanner video');
|
||||
var video_scan_code_reader = null;
|
||||
var video_scan_selected_deviceid = null;
|
||||
var video_scan_source_select = [];
|
||||
|
|
@ -4795,6 +4796,13 @@ $(function()
|
|||
video_scan_selected_deviceid = video_scan_source_select[index];
|
||||
$switch_submit.attr('data-index', index);
|
||||
$continue_submit.trigger('click');
|
||||
// 画像翻转
|
||||
if(index == 0 || video_scan_source_select.length == 1)
|
||||
{
|
||||
$video_scan.addClass('picture-reverse');
|
||||
} else {
|
||||
$video_scan.removeClass('picture-reverse');
|
||||
}
|
||||
});
|
||||
// 弹窗关闭则关闭摄像头
|
||||
$video_scan_popup.on('close.modal.amui', function()
|
||||
|
|
|
|||
Loading…
Reference in New Issue