albertshaw 8 years ago
parent
commit
ac6e998e50

+ 4 - 27
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -310,33 +310,6 @@ public class WebpageController extends BaseController {
 	}
 
 	/**
-	 * 大咖说
-	 */
-	/*@RequestMapping(value = "/portal/scienceTechnology/bigShot", method = RequestMethod.GET)
-	public ModelAndView portalScienceTechnologyBigShot(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/scienceTechnology/bigShot");
-		return modelview;
-	}*/
-
-	/**
-	 * 科技讲堂
-	 */
-	/*@RequestMapping(value = "/portal/scienceTechnology/lecture", method = RequestMethod.GET)
-	public ModelAndView portalScienceTechnologyLecture(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/scienceTechnology/lecture");
-		return modelview;
-	}*/
-
-	/**
-	 * 科技明星
-	 */
-	/*@RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
-	public ModelAndView portalScienceTechnologyStar(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/scienceTechnology/star");
-		return modelview;
-	}*/
-
-	/**
 	 * 首页
 	 */
 	@RequestMapping(value = "/portal/index", method = RequestMethod.GET)
@@ -418,6 +391,10 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/service/serviceIndex", method = RequestMethod.GET)
 	public ModelAndView portalServiceServiceIndex(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/service/serviceIndex");
+		List<Banners> banners = bannersService.findPortalBanners(BannersType.FU_WU_HUI.getKey());
+		if (!banners.isEmpty()) {
+			modelview.addObject("banners", banners);
+		}
 		return modelview;
 	}
 

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

@@ -127,7 +127,7 @@
 			<a th:href="${basePath + '/user/account/demand.html#techDemand'}">发布需求</a>
 			<a th:href="${basePath + '/user/account/achievement.html#techAchievement'}">发布技术</a>
 			<a th:href="${basePath + '/user/account/services.html#evaluate'}">我要评估</a>
-			<a class="customer-service" href="#">成为专家</a>
+			<a class="customer-service" href="javascript:;">成为专家</a>
 		</div>
 	</div>
 	<div class="container news">

+ 22 - 4
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html

@@ -35,11 +35,29 @@
 		</div>
 		<div class="secondary_navigation"></div>
 	</div>
-
-			<div class="item active">
-				<img th:src="${portalHost + '/img/service_index_banner.jpg'}"
-					alt="First slide">
+	
+	<div id="myCarousel" class="carousel slide" th:if="${banners!=null && banners.size() > 1}">
+		<ol class="carousel-indicators">
+			<th:block th:each="banner,bannerStat:${banners}">
+				<li data-target="#myCarousel" data-slide-to="0" th:class="${bannerStat.first?'active':''}"></li>
+			</th:block>
+		</ol>
+		<div class="carousel-inner">
+			<th:block  th:each="banner,bannerStat:${banners}">
+			<div class="item" th:classappend="${bannerStat.first?'active':''}">
+				<img th:src="${staticDomain +'/upload'+  banner.imgurl}" th:alt="${banner.text}">
 			</div>
+			</th:block>
+		</div>
+		<a class="carousel-control left" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
+		<a class="carousel-control right" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
+	</div>
+	<div class="banner-item" th:if="${banners!=null && banners.size()==1}">
+		<img th:src="${staticDomain +'/upload'+  banners[0].imgurl}" th:alt="${banners[0].text}">
+	</div>
+	<div class="banner-item" th:if="${banners==null}">
+		<img th:src="${portalHost + '/img/service_index_banner.jpg'}" alt="First slide">
+	</div>
 
 	<div class="container service_nav">
 		<div class="div_title">

File diff suppressed because it is too large
+ 6 - 6
src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html