axios 通过get 请求下载文件

 axios.get('/system/platform/feedbackManager/findBuyUserFedbackPage',  {
            responseType: 'blob',
            params: data
        }).then(res => {
         let url = window.URL.createObjectURL(new Blob([res.data]));
                let link = document.createElement("a");
                link.style.display = "none";
                link.href = url;
                link.setAttribute("download", this.$route.meta.title + ".xlsx");

                document.body.appendChild(link);
                console.log(res);

                link.click();
    })

你可能感兴趣的:(axios 通过get 请求下载文件)