diff --git a/admin-core/src/main/resources/static/js/lib.js b/admin-core/src/main/resources/static/js/lib.js index 6dc56227..72bee20c 100644 --- a/admin-core/src/main/resources/static/js/lib.js +++ b/admin-core/src/main/resources/static/js/lib.js @@ -1092,6 +1092,8 @@ var Lib = { }); layui.form.render(); },downloadFile:function (data){ //下载指定文件/或者预览文件 resourcesInfoType:资源类型(1视频 2课件(ppt 、pdf) 3附件) + window.location.href = Common.ctxPath + "/jlw/resourcesInfo/previewData.do?resourcesInfoId="+data.resourcesInfoId; + return; if(data.resourcesInfoType == 3){//前端下载文件 var a = document.createElement('a'); a.setAttribute('href', Common.ctxPath + data.resourcesInfoContent); //a.href='文件链接' diff --git a/admin-core/src/main/resources/static/plugins/jsZip/FileSaver.js b/admin-core/src/main/resources/static/plugins/jsZip/FileSaver.js index 52bb25a3..7b2b523a 100644 --- a/admin-core/src/main/resources/static/plugins/jsZip/FileSaver.js +++ b/admin-core/src/main/resources/static/plugins/jsZip/FileSaver.js @@ -102,7 +102,7 @@ var saveAs = saveAs if (target_view) { target_view.location.href = object_url; } else { - window.open(object_url, "_blank"); + `window.open(object_url, "_blank");` } filesaver.readyState = filesaver.DONE; dispatch_all(); diff --git a/web/src/main/java/com/ibeetl/jlw/web/ResourcesInfoController.java b/web/src/main/java/com/ibeetl/jlw/web/ResourcesInfoController.java index 7230e92a..c646ecf3 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/ResourcesInfoController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/ResourcesInfoController.java @@ -130,6 +130,7 @@ public class ResourcesInfoController{ ModelAndView view = new ModelAndView("/jlw/previewPage/previewData.html"); ResourcesInfo resourcesInfo = resourcesInfoService.getById(resourcesInfoId); view.addObject("resourcesInfo", resourcesInfo); + view.addObject("resourcesInfoContent", resourcesInfo.getResourcesInfoContent().replaceAll("\\\\","/")); return view; } diff --git a/web/src/main/resources/templates/jlw/courseInfo/courseConfigureNew.html b/web/src/main/resources/templates/jlw/courseInfo/courseConfigureNew.html index a5dae63a..cbbcf288 100644 --- a/web/src/main/resources/templates/jlw/courseInfo/courseConfigureNew.html +++ b/web/src/main/resources/templates/jlw/courseInfo/courseConfigureNew.html @@ -5,7 +5,9 @@ .layui-table a { margin-right: 10px; } - + a{ + cursor: pointer; + } .shiping { color: red; border: 2px solid red; @@ -58,14 +60,16 @@
-