收藏
回答

wx.serviceMarket.invokeService一直报错,如何解决?

wx.chooseImage({
      count1,
      successasync function(res{
        try {
          const invokeRes = await wx.serviceMarket.invokeService({
            service'wx4418e3e031e551be',
            api'OcrAllInOne',
            data: {
              img_urlnew wx.serviceMarket.CDN({
                type'filePath',
                filePath: res.tempFilePaths[0],
              }),
              data_type3,
              ocr_type1
            },
          })
    
          console.log('invokeService success', invokeRes)
          wx.showModal({
            title'success',
            contentJSON.stringify(invokeRes),
          })
        } catch (err) {
          console.error('invokeService fail', err)
          wx.showModal({
            title'fail',
            content: err,
          })
        }
      },
      failfunction(res{},
      completefunction(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)
回答关注问题邀请回答
收藏

1 个回答

  • strive
    strive
    2023-08-09

    解决了吗

    2023-08-09
    有用
    回复
登录 后发表内容