业务需求要用到ocr身份证组件,发现使用uniapp下的组件报下面的错:
API createCameraContext
is not yet implemented
TypeError: Cannot read property ‘takePhoto’ of undefined
[Vue warn]: Error in v-on handler: “TypeError: Cannot read property ‘takePhoto’ of undefined”
后来认真看了下文档发现调用的API:createCameraContext不支持H5和App,只能用安卓原生插件…
下面是平台的支持: