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()
}
})
}
})
看是不是ios机型 ios下保存的图片是不带后缀的