Browse Source

首页、新闻详情页待调整

anderx 3 years ago
parent
commit
7743f9b17e

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

@@ -142,7 +142,8 @@ public class WebpageController extends BaseController {
 		if (title.length()>18)title=title.substring(0,18);
 		String content = outNews.getContent();
 		if (content.length()>180)content=content.substring(0,180);
-		modelview.addObject("keywords","胡卡卡");
+		String keywords=outNews.getKeywords();
+		modelview.addObject("keywords",keywords);
 		modelview.addObject("tt",title);
 		modelview.addObject("content",removeHtmlTag(content));
 		modelview.addObject("news",outNews);

+ 1 - 1
src/main/java/com/kede/common/mapper/NewsMapper.xml

@@ -177,7 +177,7 @@
 
   <select id="selectByid" resultType="com.kede.news.bo.OutNews">
    select id, title, publisher, type, picture_url pictureUrl, status, sort, release_status releaseStatus,content,
-  	date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,
+  	date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,keywords,
     date_format(release_time,'%Y-%m-%d %H:%i:%S') as releaseTimeConvert ,release_time releaseTime
     from news where id = #{id,jdbcType=INTEGER}
   </select>

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -61,7 +61,7 @@ template.cacheable=false
 avatar.upload.host=//172.16.0.255:3000/upload
 #连接开�
 
-portal.host=//kedejs.jishutao.com/portal/1.0.21
+portal.host=//kedejs.jishutao.com/portal/1.0.22
 #portal.host=//172.16.0.52/portal/1.0.19
 #portal.host=//172.16.0.255:3000/1.0.21
 

+ 2 - 0
src/main/webapp/WEB-INF/views/portal/news.html

@@ -32,6 +32,8 @@
                     <li class="active"><a href="javascript:;">全部</a> </li>
                     <li><a href="javascript:;">科德新闻</a> </li>
                     <li><a href="javascript:;">行业资讯</a> </li>
+                    <li><a href="javascript:;">高新技术企业</a> </li>
+                    <li><a href="javascript:;">军工三证</a> </li>
                 </ul>
             </div>
         </div>

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

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title th:text="${tt +'... - 科德集团'}">科德集团</title>
-    <meta name="Keywords" th:content="${keywords}" Content="科德集团,媒体报道,新闻中心"/>
+    <meta name="Keywords" th:content="${keywords}"/>
     <meta name="description" th:Content="${content}"/>
     <!-- 二级页面CSS -->
     <link rel="stylesheet" th:href="${portalHost+'/css/secode.css'}">
@@ -34,7 +34,8 @@
                     <li><a th:href="${basePath+'/news'}">新闻动态</a> </li>
                     <li>&gt;</li>
                     <!-- @{/technologyTrading/achievementList(fieldA=${industry.id})} -->
-                    <li><a th:href="@{/news(type=${news.type})}" th:text="${news.type}==0?'公司新闻':'行业新闻'">公司新闻</a> </li>
+                    <li><a th:href="@{/news(type=${news.type})}"
+                           th:text="${news.type==0?'公司新闻': news.type==1?'行业新闻': news.type==2?'高新技术企业':news.type==3?'军工三证':''}">公司新闻</a> </li>
                     <li>&gt;</li>
                     <li class="active"><a href="javascript:;" th:text="${news.title}">科德高企培育系列讲座走进湘乡</a> </li>
                 </ul>