From c78bf0605d2f8dd45ce74d1a32149e3339108fdc Mon Sep 17 00:00:00 2001 From: kl <632104866@QQ.com> Date: Thu, 8 Mar 2018 09:51:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=A4=9A=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E9=A2=84=E8=A7=88=E6=8E=A5=E5=8F=A3=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/keking/web/controller/OnlinePreviewController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jodconverter-web/src/main/java/cn/keking/web/controller/OnlinePreviewController.java b/jodconverter-web/src/main/java/cn/keking/web/controller/OnlinePreviewController.java index 6b77a600..a37d981c 100644 --- a/jodconverter-web/src/main/java/cn/keking/web/controller/OnlinePreviewController.java +++ b/jodconverter-web/src/main/java/cn/keking/web/controller/OnlinePreviewController.java @@ -61,13 +61,15 @@ public class OnlinePreviewController { * @throws UnsupportedEncodingException */ @RequestMapping(value = "picturesPreview", method = RequestMethod.GET) - public String picturesPreview(String urls, Model model, HttpServletRequest req) throws UnsupportedEncodingException { + public String picturesPreview(String urls, String currentUrl, Model model, HttpServletRequest req) throws UnsupportedEncodingException { // 路径转码 String decodedUrl = URLDecoder.decode(urls, "utf-8"); + String decodedCurrentUrl = URLDecoder.decode(currentUrl, "utf-8"); // 抽取文件并返回文件列表 - String[] imgs = decodedUrl.split("|"); + String[] imgs = decodedUrl.split("\\|"); List imgurls = Arrays.asList(imgs); model.addAttribute("imgurls", imgurls); + model.addAttribute("currentUrl",decodedCurrentUrl); return "picture"; }