This commit is contained in:
cwchen 2024-11-16 18:03:45 +08:00
parent bfe5bf65ef
commit 776c619013
1 changed files with 2 additions and 1 deletions

View File

@ -337,7 +337,7 @@ function exeCommandCopyText(text) {
// 预览文件
function viewFile(obj) {
let fileName = obj.fileName.toLowerCase();
if (fileName.indexOf('png') || fileName.indexOf('jpg') || fileName.indexOf('jpeg')) {
if (fileName.indexOf('png') > -1 || fileName.indexOf('jpg') > -1 || fileName.indexOf('jpeg')> -1 ) {
layer.photos({
shade: 0.5,
photos: {
@ -354,6 +354,7 @@ function viewFile(obj) {
});
} else {
// 调用公司的预览文件的服务
commonViewFile(obj.fileUrl);
}
}