提交IE下活体检测代码

This commit is contained in:
袁帅
2022-10-28 17:23:46 +08:00
parent 38fd61e948
commit 2e5ae855f5
9 changed files with 4714 additions and 10975 deletions

View File

@ -14,11 +14,14 @@ export default class FrameFaceLogin extends React.Component {
componentDidMount() {
// 接收Iframe传递的数据
window.addEventListener("message", (e) => {
const{detectResult,actionAndTimer} = e.data|| {};
if(e.data == 'detectFinish'){
const{image,detectResult,actionAndTimer} = e.data|| {};
if(image){
this.props.faceCompareEvent2(image);
}
else if(detectResult){
this.props.faceCompareEvent(detectResult);
}else if(e.data == 'detectStatus'){
this.props.faceDetectStatusEvent(actionAndTimer.action, actionAndTimer.timer);
}else if(actionAndTimer){
this.props.faceDetectStatusEvent(actionAndTimer.arg1, actionAndTimer.arg2);
}
});
}