小程序-----打开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

猜你喜欢

转载自www.cnblogs.com/chenguiya/p/12564317.html