小程序-----打开PDF文件

wx.downloadFile({
        url:"https://xxxxxx.pdf",
        success(res){
          console.log(res)
          let data = res.tempFilePath;
          wx.openDocument({
            filePath:data,
            fileType:'pdf'
          })
        }
      })


原文来自:https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.openDocument.html
posted @ 2020-03-25 10:16  chenguiya  阅读(4908)  评论(0编辑  收藏  举报