收藏
回答

使用OCR识别驾驶证增量API服务返回错误码invokeService:fail 9311003?

 wx.chooseImage({
      count1,
      sizeType: ['original'], // 可以指定是原图还是压缩图,默认二者都有
      sourceType: ['album''camera'], // 可以指定来源是相册还是相机,默认二者都有
      successasync function (res{
        try {
          const invokeRes = await wx.serviceMarket.invokeService({
            service'wx79ac3de8be320b71',
            api'OcrAllInOne',
            data: {
              // 用 CDN 方法标记要上传并转换成 HTTP URL 的文件
              img_urlnew wx.serviceMarket.CDN({
                type'filePath',
                filePath: res.tempFilePaths[0],
              }),
              data_type3,
              ocr_type3
            },
          })
          console.log('invokeService success', invokeRes)
          wx.showModal({
            title'识别完毕',
            content'已识别信息已为您自动填入,请您检查',
          }) 
        } catch (err) {
          console.error('invokeService fail', err)
          wx.showModal({
            title'识别失败',
            content'识别失败了',
          })
        }
      },
      failfunction (res{
        wx.showModal({
          title'图片上传失败',
          content:  '图片上传失败',
        })
      },
      completefunction (res{ },
    })

请求返回:

invokeService fail Error: invokeService:fail 9311003  (requestId: MLwscXbd3YXDoM1cUO08BOhvvW10m-pCSkXm9Qjk6oqUf8W90CPjWfKl9W-GVRGxz9U)
    at VM4391 WAService.js:2
    at VM4391 WAService.js:2
    at Object.next (VM4391 WAService.js:2)
    at r (VM4391 WAService.js:2)
console.error @ VM4384:1
_callee$ @ apply.js? [sm]:92
f @ VM4391 WAService.js:2
u._invoke @ VM4391 WAService.js:2
(anonymous) @ VM4391 WAService.js:2
step @ apply.js:4
(anonymous) @ apply.js:4
Promise.then (async)
step @ apply.js:4
(anonymous) @ apply.js:4
(anonymous) @ apply.js:4
success @ apply.js? [sm]:63
i. @ VM4391 WAService.js:2
h @ VM4391 WAService.js:2
(anonymous) @ VM4391 WAService.js:2
_ @ VM4391 WAService.js:2
b @ VM4391 WAService.js:2
(anonymous) @ VM4391 WAService.js:2
(anonymous) @ VM4388 asdebug.js:1
h @ VM4391 WAService.js:2
(anonymous) @ VM4391 WAService.js:2
(anonymous) @ VM4391 WAService.js:2
setTimeout (async)
setTimeout @ VM4391 WAService.js:2
(anonymous) @ VM4388 asdebug.js:1
(anonymous) @ VM4388 asdebug.js:1
(anonymous) @ VM4388 asdebug.js:1
_ws.onmessage @ VM4388 asdebug.js:1
回答关注问题邀请回答
收藏

1 个回答

  • Mr.Luo
    Mr.Luo
    09-08
    • 昨天测试正常,今天再次使用就不行了
    09-08
    有用
    回复
登录 后发表内容
问题标签