export function exportUserinfoList(data) {
return request.postJson(urls.exportUserinfoList, data, {
responseType: "arraybuffer"
}).then((res) => {
console.log(res);
var blob = new Blob([res], {
type: 'application/msword;charset=utf-8'
});
var reader = new FileReader();
reader.readAsDataURL(blob);
let date = new Date().getTime();
reader.onload = function (e) {
var a = document.createElement('a');
a.download = `会员信息-${date}.xlsx`;
a.href = e.target.result;
document.body.append(a);
a.click();
a.remove();
}
}).catch(error => {
console.log(error)
})
}
转载请注明原文地址:https://blackberry.8miu.com/read-41922.html