pdf调用成功,但是为什么打开的都是同一个pdf?
写两个按钮,在传值传两组写死数据,调用可以预览不通的pdf;
写成活的数据,预览的都是第一次加载过的pdf??这是为什么??
写两个按钮,在传值传两组写死数据,调用可以预览不通的pdf;
写成活的数据,预览的都是第一次加载过的pdf??这是为什么??
let filename = this.literatureObj.cellTitle;
// let filename = "XXXX"; // let fileUrl ="XXXX"; let fileType = "pdf"; let content = "https://XXXX/DownLoadFileHandler?fn=" + encodeURIComponent(filename) + "&sign=" + fileType + "&downurl=" + encodeURIComponent(fileUrl); wx.downloadFile({ url: content, success: function (res) { const filePath = res.tempFilePath wx.openDocument({ filePath: filePath, fileType: fileType, success: function (res) { console.log('打开文档成功') }, fail: function (res) { console.log('打开失败') console.log(res) } }) } }) |