function loadfile(data){
let url = data.file_url
let fileName =data.title;
wx.showLoading({
title: '正在打开文件'
})
const manage = wx.getFileSystemManager();
wx.downloadFile({
url: url,
success (res) {
var savePath = wx.env.USER_DATA_PATH + "/" + fileName
if (res.statusCode == 200) {
manage.saveFile({
tempFilePath: res.tempFilePath,
filePath: savePath+'.docx',
success:function(res){
wx.openDocument({
filePath: res.savedFilePath,
success: function (res) {
wx.hideLoading()
}
})
}
})
}
}
})
}