wx.openDocument打开pdf文件失败

发布于 6 年前作者 jun7712019 次浏览最后编辑 6 年前来自 ask

wx.downloadFile({

         url: result.data,

         success: function (res) {

           var filePath = res.tempFilePath

           console.log(‘—filePath—’, res);

           wx.openDocument({

             filePath: filePath,

             success: function (res) {

               console.log(‘打开文档成功’)

               wx.hideLoading()

             }

           })

         }

       })

一直报这个错,在手机上把调试模式打开就没问题了(文档可以打开),调试模式关闭后依旧报错

0 回复
暂无回复