export function downloadFiles(param, callback) {
const blob = param.type ? new Blob(['ufeff' + param.response]) : new Blob([param.response])
if ('download' in document.createElement('a')) { // 非IE下载
const elink = document.createElement('a')
elink.download = param.filename
elink.style.display = 'none'
elink.href = param.url || window.URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
window.URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
setTimeout(function() {
callback()
}, 100)
} else { // IE10+下载
window.navigator.msSaveBlob(blob, param.filename)
setTimeout(function() {
callback()
}, 100)
}
}