Explorar o código

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front.git into develop

gagamel %!s(int64=5) %!d(string=hai) anos
pai
achega
3829baffee

+ 31 - 1
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -7,6 +7,8 @@ import java.util.HashMap;
 
 import javax.servlet.http.HttpServletResponse;
 
+import com.gagaframework.web.parameter.GagaMap;
+import com.style24.core.support.env.TscConstants;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.domain.BrandGroup;
 import com.style24.persistence.domain.Cate4Srch;
@@ -264,7 +266,7 @@ public class TsfDisplayController extends TsfBaseController {
 				Plan plan = new Plan();
 				plan.setBrandGroupNo(Integer.parseInt(paramMap.get("brandGroupNo")));
 				plan.setMaxRow(6);
-				plan.setFrontGb("P");
+				plan.setFrontGb(TsfSession.getFrontGb());
 				plan.setSiteCd("G000_10");
 				brandMain.setPlanningList(planningService.getPlanningMainList(plan));
 			}
@@ -332,4 +334,32 @@ public class TsfDisplayController extends TsfBaseController {
 		return mav;
 	}
 
+	/**
+	 * 룩북 메인
+	 * @param lookbook
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 30
+	 */
+	@GetMapping("/lookbook/main/form")
+	public ModelAndView lookbookMain(Lookbook lookbook) {
+		ModelAndView mav = new ModelAndView(super.getDeviceViewName("display/LookbookMainForm"));
+
+		return mav;
+	}
+
+	/**
+	 * 룩북 리스트
+	 * @param lookbook
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 30
+	 */
+	@GetMapping("/lookbook/main/list")
+	@ResponseBody
+	public Collection<Lookbook> lookbooklist(Lookbook lookbook) {
+		lookbook.setFrontGb(TsfSession.getFrontGb());
+		return coreLookbookService.getLookbookList(lookbook);
+	}
+
 }

+ 161 - 0
src/main/webapp/WEB-INF/views/web/display/LookbookMainFormWeb.html

@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+	layout:decorator="web/common/layout/DefaultLayoutWeb">
+<!--
+ *******************************************************************************
+ * @source  : LookbookMainFormWeb.html
+ * @desc    : 룩북메인 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.03.30   bin2107     최초 작성
+ *******************************************************************************
+ -->
+<body>
+
+<th:block layout:fragment="content">
+	<div id="container" class="container dp">
+		<div class="breadcrumb">
+			<ul>
+				<li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
+				<li class="bread_2depth">룩북</li>
+			</ul>
+		</div>
+		<div class="wrap">
+			<div class="content">
+				<div class="cont_head">
+					<div>
+						<h3>룩북</h3>
+					</div>
+					</dziv>
+					<div class="cont_body">
+						<div class="event_list" id="changeClass">
+							<div class="event_top">
+								<div class="ui_row">
+									<div class="count">
+										<span id="lookbookTotCnt"></span>개의 이벤트
+									</div>
+									<div class="ui_col_12">
+										<div class="btn_group">
+											<!-- <div class="btn_group open"> -->
+											<a href="#none" data-toggle="dropdown" class="btn btn_default tgl_dropdown" aria-expanded="true" id="brandBox">브랜드 선택<span class="caret"></span></a>
+											<div class="dropdown_menu">
+												<ul id="brandArea">
+
+												</ul>
+												<div class="ui_row">
+													<button type="button" class="fillter_reset" onclick="fnGetLookbookList();"><span>초기화</span></button>
+													<button type="button" class="fillter_apply" onclick="fnGetBrandLookbookList();"><span>적용</span></button>
+												</div>
+											</div>
+										</div>
+									</div>
+								</div>
+							</div>
+
+							<div class="list">
+								<ul class="clear event_con" id="lookbookArea" style="display: none;">
+
+								</ul>
+								<ul class="clear no_con" id="divLookbookNoData" style="display: none;">
+									<li>
+										<p><img src="/images/pc/ico_content_none.png" alt="등록된 이벤트가 없습니다."></p>
+										<span>등록된 룩북이 없습니다.</span>
+										<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">메인으로 가기</a>
+									</li>
+								</ul>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	let fnGetLookbookList = function (brandGroupNo){
+		let actionUrl = '/display/lookbook/main/list';
+		if (!gagajf.isNull(brandGroupNo)) actionUrl += '?multiBrandCd=' + brandGroupNo;
+
+		$.getJSON(actionUrl
+			, function (result, status){
+				if (status == 'success'){
+					if (result.length > 0){
+						$('#lookbookTotCnt').html('<span>' + result.length.addComma() + '</span>');
+
+						if (gagajf.isNull(brandGroupNo)){
+							$('#brandArea').html('');
+							let tag = '';
+							let brandArr = [];
+							$.each(result, function(idx, item) {
+								if(!brandArr.includes(item.brandCd)){
+									brandArr.push(item.brandCd);
+									tag += '<li>';
+									tag += '	<label class="brand_btn">';
+									tag += '		<input type="checkbox" group="filterValue" id="chkFilterBrand'+idx+'" data-name="chkFilterBrand'+idx+'" name="filterBrandCds" value="'+item.brandCd+'"><span>'+item.brandNm+'</span>';
+									tag += '	</label>';
+									tag += '</li>';
+								}
+							});
+							$('#brandArea').html(tag);
+						}
+
+						$('#lookbookArea').html('');
+						let tag2 = '';
+						tag2 += '<ul class="clear event_con" id="lookbookArea" style="display: block;">';
+						$.each(result, function(idx, item) {
+							tag2 += '<li>';
+							tag2 += '	<a href="javascript:void(0);">';
+							tag2 += '		<div class="ev_img">';
+							tag2 += '			<img src="' + _imgUrl + item.orgTnfileNm + '" alt="" style="height:100%">';
+							tag2 += '		</div>';
+							tag2 += '		<div class="txt">';
+							tag2 += '			<span class="brand">'+item.brandNm+'</span>';
+							tag2 += '			<p class="tit">'+item.title+'</p>';
+							tag2 += '		</div>';
+							tag2 += '	</a>';
+							tag2 += '</li>';
+						});
+						tag2 += '</ul>';
+
+						$('#lookbookArea').html(tag2);
+						$('#divLookbookNoData').hide();
+						$('#lookbookArea').show();
+					}else{
+						$('#lookbookTotCnt').html('<span>0</span>');
+						document.getElementById("changeClass").className = "event_list no_data";
+						$('#lookbookArea').hide();
+						$('#divLookbookNoData').show();
+					}
+				}
+				document.getElementById("brandBox").className = "btn btn_default tgl_dropdown";
+				$('.dropdown_menu').hide();
+			});
+	}
+
+	var fnGetBrandLookbookList = function (){
+		var multiBrandCd = [];
+		$("input:checkbox:checked").each(function (index) {
+			multiBrandCd.push($(this).val());
+		});
+
+		fnGetLookbookList(multiBrandCd);
+	}
+
+	$(document).ready(function() {
+		//$("#container .wrap .content .cont_body .event_list .event_top .ui_row .count").find('span').text(totalCnt.addComma());
+		fnGetLookbookList();
+	});
+
+/*]]>*/
+</script>
+
+</th:block>
+
+</body>
+</html>

+ 2 - 0
src/main/webapp/ux/style24_link.js

@@ -92,6 +92,8 @@ const _PAGE_GOODS_QNA = _frontUrl + "/callcenter/goods/qna/form";						// 고객
 const _PAGE_NOTICE = _frontUrl + "/callcenter/notice/form";								// 고객센터 > 공지사항
 
 //== 기타 ==/
+const _PAGE_LOOKBOOK_MAIN = _frontUrl + "/display/lookbook/main/form";		// 룩북 메인
+const _PAGE_LOOKBOOK_DETAIL = _frontUrl + "/display/lookbook/detail/form";		// 룩북 상세
 
 
 /**********************************************************************************************/