|
@ -330,7 +330,7 @@
|
|
|
}else{
|
|
|
// 外网做ajax
|
|
|
return new Promise(function(resolve, reject){
|
|
|
if(URL) {
|
|
|
if(window.URL) {
|
|
|
const xhr = new XMLHttpRequest();
|
|
|
if(data){
|
|
|
var p = []
|
|
@ -344,7 +344,7 @@
|
|
|
xhr.onload = function() {
|
|
|
if(xhr.readyState == 4 && xhr.status==200){
|
|
|
const blob = xhr.response;
|
|
|
const blobUrl = URL.createObjectURL(blob);
|
|
|
const blobUrl = window.URL.createObjectURL(blob);
|
|
|
const a = document.createElement('a');
|
|
|
a.style.display = 'none';
|
|
|
a.download = fileName
|
|
@ -369,7 +369,8 @@
|
|
|
xhr.setRequestHeader("userAgent", JSON.stringify(agent));
|
|
|
xhr.send();
|
|
|
}else{
|
|
|
reject('浏览器版本低,请更新浏览器后再操作!')
|
|
|
window.toastr && window.toastr.warning('您正使用外网访问系统,浏览器版本低,请更新浏览器后再操作!')
|
|
|
reject()
|
|
|
}
|
|
|
|
|
|
})
|