wx.downloadFile({ url: e.currentTarget.dataset.url, success: function (res) { const fileManager = wx.getFileSystemManager() const filePath = wx.env.USER_DATA_PATH + '/xxxx.xlsx' fileManager.saveFile({ tempFilePath: res.tempFilePath, filePath, success: () => { wx.openDocument({ filePath: filePath, showMenu: true, fileType: 'xlsx' }) wx.hideLoading() } }) } })
downloadFile下载PDF文件没有后缀名?iOS下载pdf文件,没有后缀名导致预览失败 代码链接:https://developers.weixin.qq.com/s/vlDlzDmX7Nn2 [图片][图片]
2021-03-15