浏览代码

修改模块

Enford 5 年之前
父节点
当前提交
3cc6a50b08

+ 8 - 11
src/main/java/com/jeeplus/modules/sg/managementcenter/moduleacquisition/web/ModuleBlockWeb.java

@@ -101,18 +101,15 @@ public class ModuleBlockWeb extends BaseController {
 			List<ModuleBlock> list = page.getList();
 			List<ModuleBlock> list = page.getList();
 			for (ModuleBlock upload :
 			for (ModuleBlock upload :
 					list) {
 					list) {
-				String mdImg = upload.getMdImg();
-				String newMdImg = "";
-				String[] split = mdImg.split("\\|");
-//            String reg = "(?i).+?\\.(jpg|gif|bmp)";
-				for (int i = 0; i < split.length; i++) {
-/*                if (split[i].matches(reg)) {
-                    newMdImg += split[i] + "|";
-                    continue;
-                }*/
-					newMdImg += "http://" + request.getServerName() + split[i] + "|";
+				if (null!=upload.getMdImg()&&!upload.getMdImg().equals("")){
+					String mdImg = upload.getMdImg();
+					String newMdImg = "";
+					String[] split = mdImg.split("\\|");
+					for (int i = 0; i < split.length; i++) {
+						newMdImg += "http://" + request.getServerName() + split[i] + "|";
+					}
+					upload.setMdImg(newMdImg);
 				}
 				}
-				upload.setMdImg(newMdImg);
 			}
 			}
 		}
 		}
 		return getBootstrapData(page);
 		return getBootstrapData(page);