|
@@ -39,55 +39,24 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list_content">
|
|
<div class="list_content">
|
|
|
- <div class="itemsGrp rowtype"> <!-- itemsGrp rank hot deal --> <!-- rowtype 추가시 가로형태로 출력 -->
|
|
|
|
|
- <th:block th:each="SocialData, SocialStat : ${socialGoods}">
|
|
|
|
|
- <div class="item_prod" th:class="${SocialData.stockQtySum == 0 ? 'item_prod sold_out' : 'item_prod'}">
|
|
|
|
|
- <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
|
|
- <button type="button" th:class="${SocialData.likeIt == 'likeit'}? 'itemLike active' : 'itemLike'" onclick="cfnPutWishList(this);" th:attr="goodsCd=${SocialData.goodsCd}, ithrCd='', contentsLoc='', planDtlSq=''">관심상품 추가</button>
|
|
|
|
|
- <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${SocialData.goodsCd}]])" >
|
|
|
|
|
- <div class="itemPic">
|
|
|
|
|
- <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + SocialData.sysImgNm}">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="itemSpecialPrice"><span>특가</span></div>
|
|
|
|
|
- <p class="itemBrand" th:text="${SocialData.brandGroupNm}"></p>
|
|
|
|
|
- <div class="itemName" th:text="${SocialData.goodsNm}"></div>
|
|
|
|
|
- <div class="itemComment" th:if="${SocialData.goodsTnm!=null}" th:text="${SocialData.goodsTnm}"></div>
|
|
|
|
|
- <p class="itemPrice">
|
|
|
|
|
- [[${#numbers.formatInteger(SocialData.currPrice,0,'COMMA')} + 원]]
|
|
|
|
|
- <span class="itemPrice_original" th:text="${#numbers.formatInteger(SocialData.listPrice,0,'COMMA')} + '원'"></span>
|
|
|
|
|
- <span class=" itemPercent" th:text="${#numbers.formatDecimal(SocialData.dcRate,1,0)} + '%'"></span>
|
|
|
|
|
- </p>
|
|
|
|
|
- </a>
|
|
|
|
|
- <div class="shopBagBtn">
|
|
|
|
|
- <button type="button" class="btn btn_defalt" onclick="socialAddCart(this)" th:attr="goodsCd=${SocialData.goodsCd}, minOrdQty=${SocialData.minOrdQty}, goodsType=${SocialData.goodsType}, optCd=${SocialData.optCd}">
|
|
|
|
|
- <span>쇼핑백 담기</span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </th:block>
|
|
|
|
|
|
|
+ <div class="itemsGrp rowtype" id="socialList"> <!-- itemsGrp rank hot deal --> <!-- rowtype 추가시 가로형태로 출력 -->
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</th:block>
|
|
</th:block>
|
|
|
- <th:block th:unless="${socialInfo != null}">
|
|
|
|
|
- <div class="nodata" >
|
|
|
|
|
- <div class="txt_box">
|
|
|
|
|
- <p>
|
|
|
|
|
- 진행하는 핫딜이 없습니다.
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="btn_box">
|
|
|
|
|
- <button class="btn btn_default" th:onclick="cfnGoToPage(_PAGE_MAIN);"><span>홈으로 가기</span></button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </th:block>
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
|
|
|
|
|
+<script src="/ux/plugins/gaga/gaga.infinite.scrollLayer.js"></script>
|
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
-var socialInfo = [[${socialInfo}]];
|
|
|
|
|
|
|
+let socialInfo = [[${socialInfo}]];
|
|
|
|
|
+let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
|
|
|
var socialAddCart = function (obj) {
|
|
var socialAddCart = function (obj) {
|
|
|
|
|
+
|
|
|
let btnType = "C";
|
|
let btnType = "C";
|
|
|
let params = [];
|
|
let params = [];
|
|
|
|
|
|
|
@@ -108,7 +77,87 @@ var socialAddCart = function (obj) {
|
|
|
cfnAddCart(params);
|
|
cfnAddCart(params);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+let fnGetSocialList = function() {
|
|
|
|
|
+ let actionUrl = '/social/list';
|
|
|
|
|
+
|
|
|
|
|
+ $.getJSON(actionUrl
|
|
|
|
|
+ , function(result, status) {
|
|
|
|
|
+ html = '';
|
|
|
|
|
+ if (status == 'success') {
|
|
|
|
|
+ if (result.length > 0) {
|
|
|
|
|
+ $.each(result, function(idx, item) {
|
|
|
|
|
+ if (item.stockQtySum == 0) {
|
|
|
|
|
+ html += ' <div class="item_prod"class="item_prod sold_out">';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ html += ' <div class="item_prod"class="item_prod">';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ html += ' <div class="item_state"> ';
|
|
|
|
|
+ if (item.likeIt == 'likeit') {
|
|
|
|
|
+ html += ' <button type="button" class="itemLike active" onclick="cfnPutWishList(this);" onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ html += ' <button type="button" class="itemLike" onclick="cfnPutWishList(this);" onClick="cfnPutWishList(this);" goodsCd=\''+item.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ html += ' <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail(\''+item.goodsCd+'\')" >';
|
|
|
|
|
+ html += ' <div class="itemPic">';
|
|
|
|
|
+ html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div class="itemSpecialPrice"><span>특가</span></div>';
|
|
|
|
|
+ html += ' <p class="itemBrand">'+item.brandGroupNm+'</p>';
|
|
|
|
|
+ html += ' <div class="itemName">'+item.goodsNm+'</div>';
|
|
|
|
|
+ if(item.goodsTnm != null){
|
|
|
|
|
+ html += ' <div class="itemComment">'+item.goodsTnm+'</div>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ html += ' <p class="itemPrice">';
|
|
|
|
|
+ html += item.currPrice.addComma() +'원';
|
|
|
|
|
+ if (item.currPrice != item.listPrice) {
|
|
|
|
|
+ html += ' <span class="itemPrice_original">'+item.listPrice.addComma()+'원</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.dcRate != 0) {
|
|
|
|
|
+ html += ' <span class=" itemPercent">'+item.dcRate.addComma()+'%</span>';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </p>';
|
|
|
|
|
+ html += ' </a>';
|
|
|
|
|
+ html += ' <div class="shopBagBtn">';
|
|
|
|
|
+ html += ' <button type="button" class="btn btn_defalt" onclick="socialAddCart(this)" goodsCd=\''+item.goodsCd+'\', minOrdQty=\''+item.minOrdQty+'\', goodsType=\''+item.goodsType+'\', optCd=\''+item.optCd+'\'">';
|
|
|
|
|
+ html += ' <span>쇼핑백 담기</span>';
|
|
|
|
|
+ html += ' </button>';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += '</div>';
|
|
|
|
|
+ });
|
|
|
|
|
+ $("#socialList").html(html);
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ html += '<div class="nodata" >';
|
|
|
|
|
+ html += ' <div class="txt_box">';
|
|
|
|
|
+ html += ' <p>';
|
|
|
|
|
+ html += ' 진행하는 핫딜이 없습니다.';
|
|
|
|
|
+ html += ' </p>';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div class="btn_box">';
|
|
|
|
|
+ html += ' <button class="btn btn_default" onclick="cfnGoToPage(_PAGE_MAIN);"><span>홈으로 가기</span></button>';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += '</div>';
|
|
|
|
|
+
|
|
|
|
|
+ $("#socialList").html(html);
|
|
|
|
|
+ $('#eventTotCnt').html('<span>0</span>개의 이벤트');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//인피니트 스크롤 이벤트 발생 시 데이터 가져오기
|
|
|
|
|
+var fnGetInfiniteScrollDataList = function(pageNum) {
|
|
|
|
|
+ // 콜백함수인 gagaInfiniteScroll.jsonToHtml 에서는 fnDrawInfiniteScrollData 함수를 호출한다.
|
|
|
|
|
+ gagajf.ajaxSubmitForm(document.searchForm, "/goods/list", "json", gagaInfiniteScroll.jsonToHtml);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
$(function(){
|
|
$(function(){
|
|
|
|
|
+ fnGetSocialList();
|
|
|
/* 핫딜 countDown */
|
|
/* 핫딜 countDown */
|
|
|
function hotdealTimer() {
|
|
function hotdealTimer() {
|
|
|
var endTime = new Date(socialInfo.socialEddt); // 남은시간 지정
|
|
var endTime = new Date(socialInfo.socialEddt); // 남은시간 지정
|