Commit c75f20eb authored by 周亚武's avatar 周亚武

身份证读取

parent e41d95e9
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
</content>
<content url="file://$MODULE_DIR$/node_modules" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
......
......@@ -11,7 +11,7 @@
</head>
<body>
<script>
robotType = false;//机器人硬件调用开关 true打开 false关闭
robotType = true;//机器人硬件调用开关 true打开 false关闭
window.config = {
isUpRocrUrl:true,//是否更新ocrUrl true=更新 false=不更新
......@@ -40,9 +40,9 @@
//测试环境
api: 'https://api.egovrobot.com/',
rocrUrl: "http://192.168.2.180:8099/",
rocrUrl: "https://rocr.egovrobot.com/",
webSocketUrl : "wss://api.egovrobot.com/websocket/",
aiCaseUrl: "http://192.168.0.250:8099/"
aiCaseUrl: "http://192.168.0.173:8099/"
};
</script>
......
......@@ -115,6 +115,9 @@ export default{
callback: "HighCameraCallback"
},
count:0,
personName:'',
sex:'',
idcardNum:'',
}
},
created() {
......@@ -140,12 +143,9 @@ export default{
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc':require('../../assets/images/filebox.png')});
} else if(this.formIndex == 13 || this.formIndex == 14 || this.formIndex == 15){ //只需要扫描身份证
this.materials.push({'name': '身份证', 'fileUrl': '', 'fileId': '', 'type': ''});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
this.imgFrames.push({'imgSrc': require('../../assets/images/filebox.png')});
} else if(this.formIndex == 13 || this.formIndex == 14 || this.formIndex == 15){
//只需要扫描身份证 关闭高拍仪
this.isOpenHighCamera = false;
} else {
this.materials.push({'name': '营业执照', 'fileUrl': '', 'fileId': '', 'type': ''});
this.imgDel.push({'name': '', 'imgSrc': require('../../assets/images/ico/delete.png')});
......@@ -158,9 +158,15 @@ export default{
this.openVoice();//语音播放
}
robotsdk.readIDCard({
remindvoice: "请放置身份证到识别区", //播放的声音内容
callback: "IDCardCallback" //接口回调函数
});
//将方法绑定到window下面,提供给外部调用
window.PlayAudioCallback = (res)=> this.PlayAudioCallback(res);//语音播放
window.HighCameraCallback = (success, obj)=> this.HighCameraCallback(success, obj);//获取高拍仪照片
window.IDCardCallback = (success,code, obj)=> this.IDCardCallback(success,code, obj);//获取身份证
window.ConfirmCallback = (res)=> this.ConfirmCallback(res);//提示确认,取消对话框
},
methods:{
......@@ -174,11 +180,14 @@ export default{
}
},
nextStep() {//下一步
this.isOpenHighCamera=false;
if (robotType)robotsdk.closeHighCamera();//关闭高拍仪
if (this.formIndex==1){
// this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.rocrUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=apply/XCYJYXKZ",materials:JSON.stringify(this.materials)}});
this.materials.push({'personName': this.personName, 'sex': this.sex, 'idcardNum': this.idcardNum});
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.aiCaseUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=rpaForm/sichuan/yibin/web/XCYJYXKZ",materials:JSON.stringify(this.materials)}});
}
if (this.formIndex==2){
......@@ -211,6 +220,9 @@ export default{
}
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.aiCaseUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=rpaForm/sichuan/yibin/web/JKZSQB",materials:JSON.stringify(this.identityList)}});
}
if (this.formIndex==13){
this.$router.push({ path: '/iframePage',query:{pageUrl:window.config.aiCaseUrl+"lilo/aiCase/skipSanitationRegister?pageUrl=rpaForm/sichuan/yibin/web/YDJYBAGRCNS",materials:JSON.stringify(this.materials)}});
}
},
scanBtn(){//扫描
......@@ -251,6 +263,13 @@ export default{
}
},
IDCardCallback (success,code,info){//身份证识别回调
// alert(success+"--"+code+"--"+info);
if (success){
}
},
HighCameraCallback(success, obj){////获取高拍仪照片
if (success) {
let res = eval('(' + obj + ')');//高拍仪回调的数据集
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment