units are now separated from each other, and then get stuck in downloading files. Sincerely ask for advice or give directions
.Baidu Google and everything have been searched for a long time. I don"t know if the keyword is wrong or everyone"s environment is different. It seems that the code that passes through axios is not successful. The back-end (java) wrote api"s little partner said that there will be no problem if you click on the request and download it in this way on the page that is not separated before. It has been bothering you for a long time. Please answer the puzzle
.related codes
methods: {
downloadExcel(id){
const data = {}
data.id = id
data.token = this.$store.state.token
this.axios({
method: "POST",
url: "-sharp-sharp-sharp",
data: qs.stringify(data),
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
responseType: "arraybuffer"
}).then(function(res) {
let blob = new Blob([res], {type: "multipart/form-data"});
let objectUrl = URL.createObjectURL(blob);
window.location.href = objectUrl;
});
}
}
< H2 > the following picture is the information I requested and returned < / H2 >