downAllZip({
type: this.type,
page: this.pageNo,
size: this.pageSize,
start: this.starttime,
end: this.endtime,
t: new Date().getTime()
}).then((res) => {
const blob = new Blob([res], { type: 'application/zip' }) // new一个二进制对象
const url = window.URL.createObjectURL(blob) // 转化为url
const link = document.createElement('a') // 创建个a标签
link.href = url
link.download = '证书包' + (new Date()).getTime()// 重命名
link.click()
URL.revokeObjectURL(url)
}).catch(function(err) {
console.log(err)
})
options = {
url,
method: 'POST',
headers: { 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8' },
responseType: 'blob',
data: qs.stringify(params)
}