http Content-type对照表链接:https://tool.oschina.net/commons
/**
* 下载文件以及文件重命名
* @param item 文件在数据库中存储信息
* @param that this别名
*/
export function downFile(item, that) {
// xxx是后台接口, yyy是后台需要的数据
// {responseType: 'blob'}必须添加,否则下载的文件会出现乱码
that.$axios.post('xxx', {
yyy
},
{
responseType: 'blob'
}).then(res =