chenzl 10 kuukautta sitten
vanhempi
commit
0b9d825337

+ 2 - 2
server/src/main/config/application.properties

@@ -116,9 +116,9 @@ pdf.bookmark.disable = ${KK_PDF_BOOKMARK_DISABLE:true}
 #是否禁止签名
 pdf.disable.editing = ${KK_PDF_DISABLE_EDITING:false}
 #office类型文档(word ppt)样式,默认为图片(image),可配置为pdf(预览时也有按钮切换)
-office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:image}
+office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:pdf}
 #是否关闭office预览切换开关,默认为false,可配置为true关闭
-office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:false}
+office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:true}
 
 
 #水印内容

+ 0 - 2
server/src/main/java/cn/keking/config/ConfigConstants.java

@@ -283,14 +283,12 @@ public class ConfigConstants {
     }
 
     public static void setTrustHostValue(String trustHost) {
-        System.err.println("trustHost---> " + trustHost);
         CopyOnWriteArraySet<String> trustHostSet;
         if (DEFAULT_TRUST_HOST.equalsIgnoreCase(trustHost)) {
             trustHostSet = new CopyOnWriteArraySet<>();
         } else {
             String[] trustHostArray = trustHost.toLowerCase().split(",");
             trustHostSet = new CopyOnWriteArraySet<>(Arrays.asList(trustHostArray));
-            System.err.println("trustHostSet---> " + trustHostSet.toString());
             setTrustHostSet(trustHostSet);
         }
         setTrustHostSet(trustHostSet);

+ 1 - 1
server/src/main/java/cn/keking/web/controller/FileController.java

@@ -42,7 +42,7 @@ import static cn.keking.utils.CaptchaUtil.CAPTCHA_GENERATE_TIME;
  * @author yudian-it
  * 2017/12/1
  */
-@RestController
+//@RestController
 public class FileController {
 
     private final Logger logger = LoggerFactory.getLogger(FileController.class);

+ 1 - 1
server/src/main/java/cn/keking/web/controller/OnlinePreviewController.java

@@ -67,7 +67,7 @@ public class OnlinePreviewController {
         FileAttribute fileAttribute = fileHandlerService.getFileAttribute(fileUrl, req);
         model.addAttribute("file", fileAttribute);
         FilePreview filePreview = previewFactory.get(fileAttribute);
-        logger.info("预览文件url:{},previewType:{}", fileUrl, fileAttribute.getType());
+        logger.info("预览文件url:{},previewType:{}, officePreviewType: {}", fileUrl, fileAttribute.getType(), fileAttribute.getOfficePreviewType());
         return filePreview.filePreviewHandle(fileUrl, model, fileAttribute);
     }
 

+ 0 - 1
server/src/main/resources/web/fileNotSupported.ftl

@@ -38,7 +38,6 @@
         该(${fileType})文件,系统暂不支持在线预览,具体原因如下:
         <p style="color: red;">${msg}</p>
     </span>
-    <p>有任何疑问,请加入kk开源社区知识星球咨询:<a href="https://t.zsxq.com/09ZHSXbsQ">https://t.zsxq.com/09ZHSXbsQ</a><br></p>
 </div>
 </body>
 </html>

+ 0 - 1
server/src/main/resources/web/notTrustDir.html

@@ -35,7 +35,6 @@
     <img src="images/sorry.jpg" />
     <p>
         预览源文件来自未授信的目录,请停止访问!<br>
-        有任何疑问,请加入kk开源社区知识星球咨询:<a href="https://t.zsxq.com/09ZHSXbsQ">https://t.zsxq.com/09ZHSXbsQ</a><br>
     </p>
 </div>
 </body>

+ 0 - 1
server/src/main/resources/web/notTrustHost.html

@@ -35,7 +35,6 @@
     <img src="images/sorry.jpg" />
     <p>
         预览源文件来自不受信任的站点:<span style="color: red; display: inline;">${current_host}</span> 请联系管理员!<br>
-        有任何疑问,请加入kk开源社区知识星球咨询:<a href="https://t.zsxq.com/09ZHSXbsQ">https://t.zsxq.com/09ZHSXbsQ</a><br>
     </p>
 </div>
 </body>

+ 4 - 4
server/src/main/resources/web/officeweb.ftl

@@ -60,10 +60,10 @@
 <body>
 <div id="lucky-mask-demo" style="position: absolute;z-index: 1000000;left: 0px;top: 0px;bottom: 0px;right: 0px; background: rgba(255, 255, 255, 0.8); text-align: center;font-size: 40px;align-items:center;justify-content: center;display: none;">加载中</div>
 <p style="text-align:center;">
-<div id="button-area">
-    <label><button onclick="tiaozhuan()">跳转HTML预览</button></label>
-    <button id="confirm-button" onclick="print()">打印</button>
-</div>
+<#--<div id="button-area">-->
+<#--    <label><button onclick="tiaozhuan()">跳转HTML预览</button></label>-->
+<#--    <button id="confirm-button" onclick="print()">打印</button>-->
+<#--</div>-->
 <div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;left: 0px;top: 20px;bottom: 0px;outline: none;"></div>
 
 <script src="xlsx/luckyexcel.umd.js"></script>

+ 0 - 1
server/src/main/resources/web/tiff.ftl

@@ -105,7 +105,6 @@ html += "    <span>";
 html += "        该(tif)文件,系统解析错误,具体原因如下:";
 html += "        <p style=\"color: red;\">文件[${file.name}]解析失败,请联系系统管理员</p>";
 html += "    </span>";
-html += "    <p>有任何疑问,请加入kk开源社区知识星球咨询:<a href=\"https://t.zsxq.com/09ZHSXbsQ\">https://t.zsxq.com/09ZHSXbsQ</a><br></p>";
 html += "</div>";
 html += "</body>";
 html += "</html>";