wx.openDocument打开pdf文件失败
发布于 5 年前 作者 jun77 11874 次浏览 来自 问答

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()

             }

           })

         }

       })

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

回到顶部