Browse Source

update freemarker_implicit.ftl

陈精华 1 year ago
parent
commit
7b19c70161

+ 15 - 16
server/src/main/config/freemarker_implicit.ftl

@@ -8,23 +8,22 @@
 [#-- @ftlvariable name="needFilePassword" type="java.lang.Boolean" --]
 [#-- @ftlvariable name="filePasswordError" type="java.lang.Boolean" --]
 [#-- @ftlvariable name="baseUrl" type="java.lang.String" --]
-[#-- @ftlvariable name="imgUrls" type="String" --]
+[#-- @ftlvariable name="imgUrls" type="java.util.List<String>"--]
 [#-- @ftlvariable name="textData" type="java.lang.String" --]
 [#-- @ftlvariable name="xmlContent" type="java.lang.String" --]
 [#-- @ftlvariable name="textContent" type="java.lang.String" --]
 [#-- @ftlvariable name="textType" type="java.lang.String" --]
-[#-- @ftlvariable name="markdown" type="String" --]
-[#-- @ftlvariable name="xml" type="String" --]
-[#-- @ftlvariable name="switchDisabled" type="String" --]
-[#-- @ftlvariable name="imgurls" type="String" --]
-[#-- @ftlvariable name="watermarkAngle" type="String" --]
-[#-- @ftlvariable name="watermarkHeight" type="String" --]
-[#-- @ftlvariable name="watermarkWidth" type="String" --]
-[#-- @ftlvariable name="watermarkAlpha" type="String" --]
-[#-- @ftlvariable name="watermarkColor" type="String" --]
-[#-- @ftlvariable name="watermarkFontsize" type="String" --]
-[#-- @ftlvariable name="watermarkFont" type="String" --]
-[#-- @ftlvariable name="watermarkYSpace" type="String" --]
-[#-- @ftlvariable name="watermarkXSpace" type="String" --]
-[#-- @ftlvariable name="watermarkTxt" type="String" --]
-[#-- @ftlvariable name="ordinaryUrl" type="String" --]
+[#-- @ftlvariable name="markdown" type="java.lang.String"--]
+[#-- @ftlvariable name="xml" type="java.lang.String"--]
+[#-- @ftlvariable name="switchDisabled" type="java.lang.Boolean"--]
+[#-- @ftlvariable name="watermarkAngle" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkHeight" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkWidth" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkAlpha" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkColor" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkFontsize" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkFont" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkYSpace" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkXSpace" type="java.lang.String"--]
+[#-- @ftlvariable name="watermarkTxt" type="java.lang.String"--]
+[#-- @ftlvariable name="ordinaryUrl" type="java.lang.String"--]

+ 1 - 1
server/src/main/java/cn/keking/service/impl/OfficeFilePreviewImpl.java

@@ -162,7 +162,7 @@ public class OfficeFilePreviewImpl implements FilePreview {
         if (imageUrls == null || imageUrls.size() < 1) {
             return otherFilePreview.notSupportedFile(model, fileAttribute, "office转图片异常,请联系管理员");
         }
-        model.addAttribute("imgurls", imageUrls);
+        model.addAttribute("imgUrls", imageUrls);
         model.addAttribute("currentUrl", imageUrls.get(0));
         if (officePreviewTypeImage.equals(officePreviewType)) {
             // PPT 图片模式使用专用预览页面

+ 1 - 1
server/src/main/java/cn/keking/service/impl/PdfFilePreviewImpl.java

@@ -72,7 +72,7 @@ public class PdfFilePreviewImpl implements FilePreview {
             if (imageUrls == null || imageUrls.size() < 1) {
                 return otherFilePreview.notSupportedFile(model, fileAttribute, "pdf转图片异常,请联系管理员");
             }
-            model.addAttribute("imgurls", imageUrls);
+            model.addAttribute("imgUrls", imageUrls);
             model.addAttribute("currentUrl", imageUrls.get(0));
             if (OfficeFilePreviewImpl.OFFICE_PREVIEW_TYPE_IMAGE.equals(officePreviewType)) {
                 return OFFICE_PICTURE_FILE_PREVIEW_PAGE;

+ 1 - 1
server/src/main/resources/web/officePicture.ftl

@@ -32,7 +32,7 @@
 </head>
 <body>
 <div class="container">
-    <#list imgurls as img>
+    <#list imgUrls as img>
         <div class="img-area">
             <img class="my-photo" alt="loading"  data-src="${img}" src="images/loading.gif">
         </div>

+ 2 - 2
server/src/main/resources/web/ppt.ftl

@@ -89,14 +89,14 @@
     var resultData = {
         "code": 1,
         "name": "PPT预览",
-        "totalSize": ${imgurls?size},
+        "totalSize": ${imgUrls ? size},
         "curPage": 1,
         "totalPage": 1,
         "pageSize": 10,
         "titles": null,
         "data": [
             <#assign index = 0>
-            <#list imgurls as img>
+            <#list imgUrls as img>
             <#if index != 0>, </#if>{
                 "uuid": null,
                 "title": null,