axios中的請求超時,設置請求時間


this.$axios({
url: `/sampleBase/playingExportExcel`,
method: 'get',
timeout: 600000,
responseType: 'blob',
params: {
pageNum: this.pageParam.pageNum,
pageSize: this.pageParam.pageSize,
}
}).then((data) => {
this.$Loading.finish();
setTimeout(() => {
this.exportBtnDisabled = false
}, 1500)
// const blob = new Blob([data], { type: 'text/plain;charset=utf-8' })
const url = window.URL.createObjectURL(data.data)
const a = document.createElement('a')
a.href = url
a.download = '樣衣列表.xls'
document.body.appendChild(a)
a.click()
window.URL.revokeObjectURL(url)
document.body.removeChild(a)
})


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM