anderx 6 роки тому
батько
коміт
30e471540f

+ 47 - 1
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -837,15 +837,61 @@ public class WebpageController extends BaseController {
 			}
 		}
 		modelview.addObject("projects", jtBusinessProjects);
+		List<PolicyResult> policies = (List<PolicyResult>) policyService
+				.searchPolicy("", 2, null, null, "web_index", 1, 99, null).getList();
+		for (PolicyResult p : policies) {
+			if (null != p.getTitleImg() && p.getTitleImg().contains(",")) {
+				p.setTitleImg(p.getTitleImg().substring(0, p.getTitleImg().indexOf(",")));
+			}
+		}
+		modelview.addObject("policys", policies);//政策
 		List<News> newsList = (List<News>) newsService
 				.listNews(0, null, null, null, null, null, null, 1, 8, "2", null, null,null).getList();
 		modelview.addObject("news", newsList);//资讯
+		//
+		List<News> subscriptions = (List<News>) newsService
+				.listNews(99, null, null, null, null, null, null, 1, 8, "2", null, null,null).getList();
+		modelview.addObject("subscription", subscriptions);//技淘观点精选
+
+		if (subscriptions != null && subscriptions.size() > 0 && subscriptions.get(0).getSourceUrl() != null
+				&& subscriptions.get(0).getSourceUrl().contains(".")) {
+			modelview.addObject("videoUrl", subscriptions.get(0).getSourceUrl());
+		}
+		
 		//获得轮播图数据
 		List<Banners> blist = bannersService.findBannersList("index", 0, 4, 1);
 		if(null != blist){
 			modelview.addObject("bannerlist", blist);
 		}
-	
+		//视频
+		String url = adminVideoService.getIndexVideo(1).getUrl();//首页
+		modelview.addObject("vurl", url);
+		// List<AchievementObject>
+		// achievementObjects=achievementService.getHotAchievements(9, url,
+		// "web_index");
+		// modelview.addObject("achievements",achievementObjects);
+		//
+		//
+		//
+		//
+		// List<DemandListBo> demandListBos=demandService.getHotDemand(9, url,
+		// "web_index");
+		// for(DemandListBo demandListBo:demandListBos) {
+		// if(demandListBo.getPictureUrl()==null ||
+		// !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+		// else
+		// demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		// }
+		// //专家
+		// List<UserIdentityBo>aExperts=userIdentityService.getExperts(8);
+		// for(UserIdentityBo u:aExperts) {
+		// if(u.getHeadPortraitUrl()!=null &&
+		// u.getHeadPortraitUrl().length()<=0) {
+		// u.setHeadPortraitUrl(null);
+		// }
+		// }
+		// modelview.addObject("experts",aExperts);
+		// modelview.addObject("demands",demandListBos);
 
 		return modelview;
 	}

+ 86 - 31
src/main/webapp/WEB-INF/views/portal/index.html

@@ -140,35 +140,7 @@
 			</div>
 			
 		</div>
-		<div class="container">
-		<div class="RecommendTitle">
-			<h2>政策资讯</h2>
-			<span></span>
-		</div>
-		<div class="news">
-			<div class="consultation">
-				<h4>资讯
-				 <a th:href="@{/portal/thinkTank/policyList?type=0}"><span class="line"></span><span>></span></a>
-				</h4>
-				<ul>
-					
-					<li th:each="n:${news}">
-						<a th:href="@{/portal/news/newsDetail(id=${n.id},type=1)}">
-							<div class="time">
-								<span th:text="${#dates.format(n.releaseDate,'MM-dd')}">03-12</span>
-								<span th:text="${#dates.format(n.releaseDate,'yyyy')}">2018</span>
-							</div>
-							<div class="newTxt">
-								<h5 th:text="${#strings.abbreviate(n.title,18)}">加奖金哦违法爱按金额积分经济积分经济积分经济if啊积分经济交往和居委会看看哇卡哇卡...</h5>
-								<p th:text="${#strings.abbreviate(n.summary,65)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
-							</div>
-						</a>
-					</li>
-				</ul>
-			</div>
-		</div>
-	</div>
-		<!-- <div id="wield">
+		<div id="wield">
 			<div class="terrace_title">
 				<img th:src="${portalHost+'/img/indedImg/inded4.png'}" alt="" />
 			</div>
@@ -230,8 +202,91 @@
 				</div>
 			</div>
 		</div>
-	
-		
+	<div class="container">
+		<div class="RecommendTitle">
+			<h2>政策资讯</h2>
+			<span></span>
+		</div>
+		<div class="news">
+			<div class="policy">
+				<h4>政策
+					<a th:href="@{/portal/thinkTank/policyList?type=1}"><span class="line"></span><span>></span></a> 
+					
+				</h4>
+				<img th:if="${policys[0]}!=null" th:src="(${policys[0].titleImg}==null or ${policys[0].titleImg} == '')?${portalHost+'/img/index/index_new2.jpg'}:${avatarUploadHost+policys[0].titleImg}" alt="">
+				<ul>				
+					<li th:each="p,pStatus:${policys}" th:if="${pStatus.index}==0">
+						<a th:href="@{/portal/news/newsDetail(id=${p.id},type=0)}">
+							<div class="time">
+								<span th:text="${#dates.format(p.releaseDate,'MM-dd')}">03-12</span>
+								<span th:text="${#dates.format(p.releaseDate,'yyyy')}">2018</span>
+							</div>
+							<div class="newTxt">
+								<h5 th:text="${#strings.abbreviate(p.title,18)}"></h5>
+								<p th:text="${#strings.abbreviate(p.summary,65)}"></p>
+							</div>
+						</a>
+					</li>
+				</ul>
+			</div>
+			<div class="consultation">
+				<h4>资讯
+				 <a th:href="@{/portal/thinkTank/policyList?type=0}"><span class="line"></span><span>></span></a>
+				</h4>
+				<ul>
+					
+					<li th:each="n:${news}">
+						<a th:href="@{/portal/news/newsDetail(id=${n.id},type=1)}">
+							<div class="time">
+								<span th:text="${#dates.format(n.releaseDate,'MM-dd')}">03-12</span>
+								<span th:text="${#dates.format(n.releaseDate,'yyyy')}">2018</span>
+							</div>
+							<div class="newTxt">
+								<h5 th:text="${#strings.abbreviate(n.title,18)}">加奖金哦违法爱按金额积分经济积分经济积分经济if啊积分经济交往和居委会看看哇卡哇卡...</h5>
+								<p th:text="${#strings.abbreviate(n.summary,65)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
+							</div>
+						</a>
+					</li>
+				</ul>
+			</div>
+		</div>
+		<div class="RecommendTitle">
+			<h2>技淘观点精选</h2>
+			<span></span>
+		</div>
+		<!-- <div class="view">
+			<h4>
+				<a th:href="@{/portal/thinkTank/policyList?type=99}"><span class="line"></span><span>></span></a>
+			</h4>
+		</div> -->
+		<div class="publicNumber">
+			<!-- <div class="video" >
+				<iframe frameborder="0" width="565" height="320" th:src="${videoUrl}==null?'https://v.qq.com/iframe/player.html?vid=y0721rsmr4r&tiny=0&auto=0':${videoUrl}" allowfullscreen></iframe>
+			</div> -->
+			<ul>
+				
+				<li th:each="sc:${subscription}">
+					<a th:href="@{/portal/news/newsDetail(id=${sc.id},type=1)}">
+						<div class="time">
+							<span th:text="${#dates.format(sc.releaseDate,'MM-dd')}">03-12</span>
+							<span th:text="${#dates.format(sc.releaseDate,'yyyy')}">2018</span>
+						</div>
+						<p th:text="${#strings.abbreviate(sc.title,18)}"></p>
+					</a>
+				</li>
+			</ul>
+		</div>
+		<a th:href="@{/portal/thinkTank/policyList?type=99}" class="more">MORE
+			<span></span>
+		</a>
+	</div>
+	<div class="initModel">
+		<div>
+			<span class="glyphicon glyphicon-remove"></span>
+			<a th:href="@{/portal/invitation}" class="moreActive">了解活动规则详情 >></a>
+			<a th:href="@{/user/signIn}" class="ljZhuCe">立即注册 >></a>
+		</div>
+	</div>
 	<footer>
 		<div th:replace="common::copyright"></div>
 		<div th:replace="common::login"></div>