The file at 'blob:http://xxxx' was loaded over an insecure connection. This file should be served over HTTPS. 这种要怎么改?
<div @click="download">下载</div>
download() {
const x: any = new window.XMLHttpRequest();
x.open(
"GET",
"https:xxxx.xlsx",
true
);
x.responseType = "blob";
x.onload = () => {
const url = window.URL.createObjectURL(x.response);
const link = document.createElement("a");
link.href = url;
link.download = "格式文件.xlsx";
link.click();
};
x.send();
}