调用wx.chooseImage之后进行ocr身份证识别出错,错误码-2是什么原因?
wx.chooseImage({
count:1,
success(res) {
let url = res.tempFilePaths[0];
wx.serviceMarket.invokeService({
service: 'wx79ac3de8be320b71',
api: 'OcrAllInOne',
data: {
img_url: url,
data_type: 3,
ocr_type: 1,
},
}).then(res => {
console.log(res);
}).catch(err => console.log(err))
}
})
报错:
Error: invokeService:fail operateWXData:fail (err_code -2) at VM4738 WAService.js:2 at VM4738 WAService.js:2 at Object.throw (VM4738 WAService.js:2) at o (VM4738 WAService.js:2)