From 87096364d8775ecedbcc1abc31755d07b88c1c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Wed, 3 Jul 2019 17:06:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=A4=BA=E4=BE=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=81=E9=A6=96=E9=A1=B5=E6=9B=B4=E6=96=B0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/web/index.ftl | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/jodconverter-web/src/main/resources/web/index.ftl b/jodconverter-web/src/main/resources/web/index.ftl index 58e3432e..9185cb46 100644 --- a/jodconverter-web/src/main/resources/web/index.ftl +++ b/jodconverter-web/src/main/resources/web/index.ftl @@ -29,22 +29,15 @@ 如果你的项目需要接入文件预览项目,达到对docx、excel、ppt、jpg等文件的预览效果,那么通过在你的项目中加入下面的代码就可以 成功实现:
- $scope.openWin = function (fileUrl) { - var url = configuration.previewUrl + encodeURIComponent(fileUrl); - var winHeight = window.document.documentElement.clientHeight-10; - $window.open(url, "_blank", "height=" + winHeight - + ",top=80,left=80,toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); - }; +var url = 'http://127.0.0.1:8080/file/test.txt'; //要预览文件的访问地址 +window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(url));
- var fileUrl =url1+"|"+"url2";//多文件使用“|”字符隔开 - var url = "http://localhost:8012/picturesPreview?urls" + encodeURIComponent(fileUrl); - var winHeight = window.document.documentElement.clientHeight-10; - $window.open(url, "_blank", "height=" + winHeight - + ",top=80,left=80,toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); +var fileUrl =url1+"|"+"url2";//多文件使用“|”字符隔开 +window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(fileUrl));