Sfoglia il codice sorgente

网站路径优化(除掉新闻详情链接)

anderx 4 anni fa
parent
commit
8bee25d9a3

+ 9 - 2
src/main/java/com/kede/common/controller/WebpageController.java

@@ -1,6 +1,7 @@
 package com.kede.common.controller;
 
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Matcher;
@@ -327,9 +328,15 @@ public class WebpageController extends BaseController {
 	}
 
 	@RequestMapping(value = "/portal/index", method = RequestMethod.GET)
-	public String  portalIndex(HttpServletRequest request, ModelAndView modelview) {
-		return "redirect:/";
+	public void  portalIndex(HttpServletResponse response){
+		try {
+			response.sendRedirect("/");
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+//		return "redirect:/";
 	}
+
 	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public ModelAndView protalIndex(HttpServletRequest request, ModelAndView modelview) {

+ 1 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -662,7 +662,7 @@
     <!-- 导航栏效果、回到顶部 -->
     <script th:if="${type}!='houtai'" th:src="${portalHost+'/js/secode.js'}"></script>
     <script th:if="${type}!='houtai'" th:src="${portalHost+'/js/register.js'}"></script>
-    <script th:inline="javascript">
+    <script  th:if="${type}=='houtai'" th:inline="javascript">
         /*<![CDATA[*/
         window.globalConfig = {};
         globalConfig.context = /*[[${basePath}]]*/'';