downloadFile(){
wx.showLoading({
title: '正在下载并打开',
})
wx.downloadFile({
url: 'https://xxx.xxx.com/路径.xls',
header: {
'content-type': 'multipart/form-data',
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
},
success: function(res) {
wx.hideLoading()
// wx.saveFile({
wx.getFileSystemManager().saveFile({
tempFilePath: res.tempFilePath,
filePath: wx.env.USER_DATA_PATH + "/文件名" + '.xlsx',
success: function(res) {
wx.openDocument({
filePath: res.savedFilePath,
showMenu:true,
success: function(res) {
},
fail(err) {
app.Tips({
title: '简历打开失败',
icon:"error"
});
console.lo