Browse Source

官网新增关键词等开发

anderx 2 years ago
parent
commit
971268c1a2

+ 1 - 1
src/main/java/com/kede/admin/controller/AdminSystemController.java

@@ -87,7 +87,7 @@ public class AdminSystemController extends BaseApiController {
 		}
 		return res.data(adminService.addSysConfig(in));
 	}
-	@RequestMapping(value = "/getSysConfig",method = RequestMethod.POST)
+	@RequestMapping(value = "/getSysConfig",method = RequestMethod.GET)
 		public Result getSysConfig(Integer id){
 			Result res=new Result();
 			return res.data(adminService.getSysConfig(id));

+ 8 - 0
src/main/java/com/kede/common/controller/WebpageController.java

@@ -12,6 +12,8 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.kede.admin.service.AdminService;
+import com.kede.common.model.SysConfig;
 import com.kede.core.mybatis.page.Pagination;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -44,6 +46,8 @@ public class WebpageController extends BaseController {
 	private CustomerCaseService customerCaseService;
 	@Resource
 	private OrganizationService	organizationService;
+	@Resource
+	private AdminService adminService;
 
 	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
 	public ModelAndView adminLogin(HttpServletRequest request, ModelAndView modelview) {
@@ -149,6 +153,10 @@ public class WebpageController extends BaseController {
 		List<String>  keywords= Arrays.asList(split);
 		modelview.addObject("keywords",keywords);
 		}
+		SysConfig sysConfig = adminService.getSysConfig(100);
+		if (sysConfig!=null){
+			modelview.addObject("bzsm",sysConfig.getContent());
+		}
 		modelview.addObject("tt",title);
 		modelview.addObject("content",removeHtmlTag(content));
 		modelview.addObject("news",outNews);

+ 0 - 1
src/main/webapp/WEB-INF/views/portal/about.html

@@ -823,7 +823,6 @@
                                     <p>
                                         科德集团成立20周年<br/>
                                         开辟“政、产、学、研、金、介、媒”深度融合的园区服务新模式<br/>
-                                        “人机协同技术在科技创新中的研究与应用”项目获长沙市科技重大专项(人工智能专项)立项<br/>
                                         中共湖南科德信息咨询集团有限公司支部委员会正式成立
                                     </p>
                                 </div>

+ 3 - 7
src/main/webapp/WEB-INF/views/portal/newsDetails.html

@@ -64,7 +64,7 @@
             <div class="copyright">
               <p>
                 <span style="font-size: 18px;">热门关键词:</span>
-                <a class="kw" th:each="key:${keywords}" th:text="${key}+'&nbsp;&nbsp;'"></a>
+                <a class="kw" th:each="key:${keywords}" th:text="${key}"></a>
               </p>
               <p>上一篇: <a th:if="${news.beforeId} != null" th:href="'/news/'+${news.beforeId}"
                          th:text="${news.beforeTitle}"></a>
@@ -74,12 +74,8 @@
                          th:text="${news.afterTitle}"></a>
                 <a th:if="${news.afterId}  == null" th:text="已经是最后一篇"></a>
               </p>
-              <div class="bzsm">
-                【本站声明】
-                <p>1、本网站发布的该篇文章,主要解读科技咨询知识及传递、交流政策奖补信息,以便您学习或了解政策知识,请不要用于其它用途;</p>
-                <p>2、该篇文章中所涉及的商标、标识的商品/服务并非来源于本网站,更非本网站提供,与本网站无关,系他人的商品或服务,本网站对于该类商标、标识不拥有任何权利;</p>
-                <p>3、本网站不对该篇文章中所涉及的商标、标识的商品/服务作任何明示或暗示的保证或担保;</p>
-                <p>4、本网站不对文章中所涉及的内容真实性、准确性、可靠性负责,仅系客观性描述,如您需要了解该项目详细的资讯,请您直接与在线客服联系。</p>
+              <div class="bzsm" th:utext="${bzsm}">
+
               </div>
             </div>
           </div>