收藏
回答

wx.openDocument打开pdf没有反应 ?

ios系统真机测试时用wx.openDocument打开pdf文件没有反应,打印结果已经进入success回调 但是没打开pdf文件

            wx.downloadFile({
              url: result.data.data.fileUrl,      
              success: function (res) {
                console.log('wx.downloadFile成功,', res)
                if (res.statusCode == 200) {                     
                  let Path = res.tempFilePath
                  console.log('res.statusCode == 200,开始wx.openDocument'
                  wx.openDocument({
                    filePath: Path,                
                    success: function (res) {
                      console.log('wx.openDocument success')
                      setTimeout(() => {
                        _this.canSign = true
                      }, 1000);
                    },
                    fail: function (res) {
                      console.log(res, 'wx.openDocument fail')
                    }
                  })
                }
              },
              fail: function (res) {
               console.log(res)         
              }
            })


回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签