ios适配

This commit is contained in:
zyn
2023-04-07 18:50:52 +08:00
parent 62f13b28b1
commit 3decbacdf7
+9 -9
View File
@@ -2803,17 +2803,17 @@
const nowTime = new Date().getTime()
this.loadingText = true
if (editFileInfo.fileSuffix.toLowerCase() === 'pdf') {
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
//alert(navigator.userAgent);
this.getFileInfo(editFileInfo.id)
} else if (/(Android)/i.test(navigator.userAgent)) {
//alert(navigator.userAgent);
// if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
// //alert(navigator.userAgent);
// this.getFileInfo(editFileInfo.id)
// } else if (/(Android)/i.test(navigator.userAgent)) {
// //alert(navigator.userAgent);
// this.loadingText = false
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
// } else {
this.loadingText = false
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
} else {
this.loadingText = false
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}
// }
// window.open('/#/phonePDF?fileId='+editFileInfo.id)
} else {
const nowTime = new Date().getTime()