<template>
<div>
<ocr-navigator ref="ocr" @onSuccess="handleSucces" certificateType="idCard" :selectedOptions="ocrType">
<button type="primary">身份证识别</button>
</ocr-navigator>
</div>
</template>
<script>
export default {
name: 'ContractSign',
data () {
return {
ocrType: ['id','name','sex','birthday','homePlace']
}
},
methods: {
handleSucces (e) {
console.log(e) //underfined
}
}
}
</script>
以下是原生小程序写法
<ocr-navigator bind:onSuccess="success" certificateType="idCard" opposite="{{false}}">
<button type="primary">身份证正面识别</button>
</ocr-navigator>
0 个回复