wx.chooseImage({
count: 1,
success: async function(res) {
try {
const invokeRes = await wx.serviceMarket.invokeService({
service: 'wx4418e3e031e551be',
api: 'OcrAllInOne',
data: {
img_url: new wx.serviceMarket.CDN({
type: 'filePath',
filePath: res.tempFilePaths[0],
}),
data_type: 3,
ocr_type: 1
},
})
console.log('invokeService success', invokeRes)
wx.showModal({
title: 'success',
content: JSON.stringify(invokeRes),
})
} catch (err) {
console.error('invokeService fail', err)
wx.showModal({
title: 'fail',
content: err,
})
}
},
fail: function(res) {},
complete: function(res) {},
})
开发工具报: invokeService:fail 9301008 invalid api info (requestId: undefined)
真机报:invokeService:fail 107 . unknown scene undefined (callId: 0.07243664397814498_1632708599220) (trace: 10:9:59 start->10:9:59 unexpected scene)
解决了吗