发票下载预览

This commit is contained in:
duan
2024-05-31 15:49:35 +08:00
parent 691b3f8268
commit 8e9e460cb3
3 changed files with 12 additions and 2 deletions

View File

@@ -28,7 +28,17 @@
// this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
// console.log(this.url)
var user = navigator.userAgent;
//android端
var isAndroid = user.indexOf("Android") > -1 || user.indexOf("Adr") > -1;
//ios端
var isiOS = !!user.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isAndroid) {
window.open(res.data.data)
}else if(isiOS) {
window.location.href = res.data.data;
}
// window.open(res.data.data)
}
});