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", item.originalFileName);//指定下载的文件名
         document.body.appendChild(link);
         link.click();
    })

你可能感兴趣的:(JS高级,前端工程化,Vue)