export function exportInfo(res,name='数据导出'){
const link = document.createElement('a')
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
let num = ''
for (let i = 0; i < 10; i++) {
num += Math.ceil(Math.random() * 10)
}
link.setAttribute('download', name+'.xls')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
使用
luckWheelExcel(param).then(res => {
exportInfo(res, '客户参与明细_' + new Date().toLocaleDateString())
loading.close()
})