3.0.+识别身份证只能识别出背面有效期,正面信息回调信息没有,3.0以下版本正反面信息都可以回调成功
< ocr-navigator bind:onSuccess = "success" certificateType = "idCard" > < button type = "primary" >身份证识别</ button > </ ocr-navigator > |
success: function (e){ console.log(e); console.log(e.detail.card_position); } |
detail: card_position: {pos: {…}, label: Array( 0 )} image_height: 230 image_path: "wxfile://tmp_d6134d8811da35859fb487a0f0.png" image_width: 388 type: 1 valid_date: {text: "20160321-20260321" , pos: {…}, label: Array( 0 )} |
valid_date 这个就是有效期哈
<ocr-navigator bind:onSuccess="success" certificateType="idCard" opposite="{{false}}">
<button type="primary">身份证正面识别</button>
</ocr-navigator>