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()
}
})
}
})