|
@@ -185,34 +185,38 @@
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 검색결과 상품목록 호출(있으면 검색결과 페이지로 이동)
|
|
|
|
|
- gagajf.ajaxFormSubmit("/display/search/goods/list_cnt", document.searchMainForm, function(result) {
|
|
|
|
|
- if( "0" == result.response_cnt){
|
|
|
|
|
- $('.common_search .area_result .default_box').hide();
|
|
|
|
|
- $('.common_search .area_result .searching_box').hide();
|
|
|
|
|
- $('.common_search .area_result .empty_box').show();
|
|
|
|
|
- $('.empty_box .nodata').find('#noDataKeyword').text("'"+$("#searchMainForm").find('input[name=keyword]').val()+"'");
|
|
|
|
|
-
|
|
|
|
|
- // 검색결과 페이지에서 검색팝업 띄웠을때 (검색결과 페이지에 정의되어있으므로 내용 안뜨는 오류)
|
|
|
|
|
- console.log("= "+$("input[name=keyword]").length);
|
|
|
|
|
- if( 1 == $("input[name=keyword]").length ){
|
|
|
|
|
- $(".common_search .recommend").show();
|
|
|
|
|
- // 검색어 연관 상품 추천
|
|
|
|
|
- fnRecommendItemList($("#searchMainForm").find('input[name=keyword]').val());
|
|
|
|
|
|
|
+ if( !enterBool ){
|
|
|
|
|
+ enterBool = true;
|
|
|
|
|
+ // 검색결과 상품목록 호출(있으면 검색결과 페이지로 이동)
|
|
|
|
|
+ gagajf.ajaxFormSubmit("/display/search/goods/list_cnt", document.searchMainForm, function(result) {
|
|
|
|
|
+ enterBool = false;
|
|
|
|
|
+ if( "0" == result.response_cnt){
|
|
|
|
|
+ $('.common_search .area_result .default_box').hide();
|
|
|
|
|
+ $('.common_search .area_result .searching_box').hide();
|
|
|
|
|
+ $('.common_search .area_result .empty_box').show();
|
|
|
|
|
+ $('.empty_box .nodata').find('#noDataKeyword').text("'"+$("#searchMainForm").find('input[name=keyword]').val()+"'");
|
|
|
|
|
+
|
|
|
|
|
+ // 검색결과 페이지에서 검색팝업 띄웠을때 (검색결과 페이지에 정의되어있으므로 내용 안뜨는 오류)
|
|
|
|
|
+ console.log("= "+$("input[name=keyword]").length);
|
|
|
|
|
+ if( 1 == $("input[name=keyword]").length ){
|
|
|
|
|
+ $(".common_search .recommend").show();
|
|
|
|
|
+ // 검색어 연관 상품 추천
|
|
|
|
|
+ fnRecommendItemList($("#searchMainForm").find('input[name=keyword]').val());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $(".common_search .recommend").hide();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}else{
|
|
}else{
|
|
|
- $(".common_search .recommend").hide();
|
|
|
|
|
|
|
+ let keyword = encodeURIComponent($('#searchMainForm input[name=keyword]').val());
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠키 세팅
|
|
|
|
|
+ fnSetKeywordCookie(keyword);
|
|
|
|
|
+
|
|
|
|
|
+ let actionUrl = _PAGE_SEARCH_GOODS + '?keyword=' + keyword + '&brandGroupNo=' + $('#searchMainForm input[name=brandGroupNo]').val();
|
|
|
|
|
+ cfnGoToPage(actionUrl);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- let keyword = encodeURIComponent($('#searchMainForm input[name=keyword]').val());
|
|
|
|
|
-
|
|
|
|
|
- // 쿠키 세팅
|
|
|
|
|
- fnSetKeywordCookie(keyword);
|
|
|
|
|
-
|
|
|
|
|
- let actionUrl = _PAGE_SEARCH_GOODS + '?keyword=' + keyword + '&brandGroupNo=' + $('#searchMainForm input[name=brandGroupNo]').val();
|
|
|
|
|
- cfnGoToPage(actionUrl);
|
|
|
|
|
- }
|
|
|
|
|
- }, true);
|
|
|
|
|
|
|
+ }, true);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
var submain_slide;
|
|
var submain_slide;
|