From b366d0b4648af27ae8b19cf93f635b639625959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Fri, 11 Nov 2022 10:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=A2=84=E8=A7=88=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E5=90=88=E6=B3=95url=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/resources/web/index.ftl | 43 ++++++++++++++++++++----- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/server/src/main/resources/web/index.ftl b/server/src/main/resources/web/index.ftl index bd84fba5..48ff913e 100644 --- a/server/src/main/resources/web/index.ftl +++ b/server/src/main/resources/web/index.ftl @@ -36,15 +36,15 @@ 如果你的项目需要接入文件预览项目,达到对docx、excel、ppt、jpg等文件的预览效果,那么通过在你的项目中加入下面的代码就可以 成功实现:
- var url = 'http://127.0.0.1:8080/file/test.txt'; //要预览文件的访问地址
- window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(base64Encode(url)));
+var url = 'http://127.0.0.1:8080/file/test.txt'; //要预览文件的访问地址
+window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(base64Encode(url)));
- var fileUrl =url1+"|"+"url2";//多文件使用“|”字符隔开
- window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(base64Encode(fileUrl)));
+var fileUrl =url1+"|"+"url2";//多文件使用“|”字符隔开
+window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(base64Encode(fileUrl)));