1.axios post方式下载excel文件
calculationResultExport(data) {
axios.post('/wechat/myd/calculationResultExport', data, {responseType:'arraybuffer'}).then((res) => {
let blob =new Blob([res.data], {type:"application/vnd.ms-excel"});
let objectUrl =URL.createObjectURL(blob);
let link_a=document.createElement('a');
let file_name='test.xls';
link_a.href=objectUrl;
link_a.download=file_name;
link_a.click();
}).catch(function (res) {
});
}
相关参考:http://www.cnblogs.com/wanliyuan/p/5650105.html
2.git 工具sourceTree免登录https://blog.csdn.net/u011498933/article/details/78329448