Kaynağa Gözat

增加营业执照上传PDF的兼容性

sandm 2 yıl önce
ebeveyn
işleme
b69b33d020

+ 7 - 10
app/admin/view/enterprise/goto_enterprise_detail_page.html

@@ -44,16 +44,13 @@
         } else {
             $(".type1").attr("style", "display:none");
         }
-        var photoImg = $("#yyzz").attr("src");
-        var oldSn = photoImg.lastIndexOf(".");
-        var oldSuffix = photoImg.substring(oldSn + 1, photoImg.length);
-        if (oldSuffix == 'pdf' || oldSuffix == 'PDF') {
-            $("#yyzz").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
-            // $("#yyzz").attr("onclick", Feng.showPdf(photoImg,"pdf","预览"));
-            $("#yyzz").removeAttr("onclick").unbind("click").click(function () {
-                Feng.showPdf(photoImg, "pdf", "预览")
-            });
-        }
+        {if condition="!$ep['imgurl_is_img']"}
+        $("#yyzz").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
+        // $("#yyzz").attr("onclick", Feng.showPdf(photoImg,"pdf","预览"));
+        $("#yyzz").removeAttr("onclick").unbind("click").click(function () {
+            Feng.showPdf(photoImg, "pdf", "预览")
+        });
+        {/if}
         Feng.getCheckLog("logTable", {"type": 10, "mainId": '{$ep.id}', "typeFileId": "", "active": 1})
     });