IE11下进行拍照代码,不走后台,前端将拍照后的数据通过canvas画布进行获取,目的是为了后续再准备活体检测时,每100ms进行拍照对后台服务器造成压力
This commit is contained in:
@ -288,12 +288,14 @@ const Index: React.FC<{}> = () => {
|
||||
//RgbToBase64
|
||||
const RgbToBase64 = async (image: any) => {
|
||||
setSubmitLoading(true);
|
||||
await rgbToBase64({ image }).then(res => {
|
||||
const _blob = base64ToBlob('data:image/jpg;base64,' + res.data);
|
||||
hanleFaceSubmit(_blob, null);
|
||||
}).catch(e => {
|
||||
setSubmitLoading(false);
|
||||
});
|
||||
// await rgbToBase64({ image }).then(res => {
|
||||
// const _blob = base64ToBlob('data:image/jpg;base64,' + res.data);
|
||||
// hanleFaceSubmit(_blob, null);
|
||||
// }).catch(e => {
|
||||
// setSubmitLoading(false);
|
||||
// });
|
||||
console.log(1, image);
|
||||
hanleFaceSubmit(base64ToBlob(image), null);
|
||||
}
|
||||
|
||||
//是https或者是本地
|
||||
|
Reference in New Issue
Block a user