第一种
let url =process.env.VUE_APP_BASE_API +"jiekou="?appId=1001001+"&token="+getCookie("token") +"¶msObject="+paramsObject;
window.open(url, "_blank");
paramsObject是参数对象{}
第二种(封装好axios的请求)
request.post(`${tccsCommon.getApiBaseUrl(this.baseApiType)}/jiekou`, par,{responseType: "blob"}).then(res => {
this.loading=false
const blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
const url = window.URL.createObjectURL(res.data);
const a = document.createElement("a");
a.style.display = "none";
let str=res.headers['content-disposition']
a.download = decodeURI(str).substr(decodeURI(str).indexOf('=') + 1);
a.href = url;
a.click();
});