|
|
@@ -204,7 +204,7 @@
|
|
|
if (!gagajf.validation($('#searchMainForm'))) {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 검색결과 상품목록 호출(있으면 검색결과 페이지로 이동)
|
|
|
gagajf.ajaxFormSubmit("/display/search/goods/list_cnt", document.searchMainForm, function(result) {
|
|
|
if( "0" == result.response_cnt){
|
|
|
@@ -213,12 +213,12 @@
|
|
|
$('.sch_result .empty_box2').hide();
|
|
|
$('.sch_result .empty_box').show();
|
|
|
$("#noDataArea").find('#noDataKeyword').text($("#searchMainForm").find('input[name=keyword]').val());
|
|
|
-
|
|
|
+
|
|
|
// 검색어 연관 상품 추천
|
|
|
fnRecommendItemList($("#searchMainForm").find('input[name=keyword]').val());
|
|
|
// 인기검색어
|
|
|
fnTrendKeywordList();
|
|
|
-
|
|
|
+
|
|
|
}else{
|
|
|
let keyword = encodeURIComponent($('#searchMainForm input[name=keyword]').val());
|
|
|
|
|
|
@@ -226,7 +226,7 @@
|
|
|
fnSetKeywordCookie(keyword);
|
|
|
|
|
|
let actionUrl = _PAGE_BRAND_SEARCH_GOODS + '?keyword=' + keyword + '&brandGroupNo=' + $('#searchMainForm input[name=brandGroupNo]').val();
|
|
|
-
|
|
|
+
|
|
|
cfnGoToPage(actionUrl);
|
|
|
}
|
|
|
});
|
|
|
@@ -240,12 +240,12 @@
|
|
|
// 검색어 찾기 결과
|
|
|
var fnAutoCompleteList = function (result){
|
|
|
if( enterBool ) return;
|
|
|
-
|
|
|
- if(result.autoKeywords.length==0 && gagajf.isNull(result.goodsList)){
|
|
|
+
|
|
|
+ if(result && result.autoKeywords && result.autoKeywords.length==0 && gagajf.isNull(result.goodsList)){
|
|
|
$('.sch_result .default_box').hide();
|
|
|
$('.sch_result .searching_box').hide();
|
|
|
$('.sch_result .empty_box2').hide();
|
|
|
-
|
|
|
+
|
|
|
}else{
|
|
|
$('.sch_result .default_box').hide();
|
|
|
$('.sch_result .searching_box').show();
|
|
|
@@ -319,7 +319,7 @@
|
|
|
// }else{
|
|
|
// $("#keyupCateArea").find(".sch_category").html('');
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
if(!gagajf.isNull(result.goodsList)){
|
|
|
$("#relateGoodsDiv").show();
|
|
|
$("#relateArea").html('');
|
|
|
@@ -388,8 +388,8 @@
|
|
|
$('.sch_result .empty_box2').hide();
|
|
|
}
|
|
|
}else{
|
|
|
- // 엔터친 후, 그 전에 검색한 결과가 오고있으므로
|
|
|
- enterBool = true;
|
|
|
+ // 엔터친 후, 그 전에 검색한 결과가 오고있으므로
|
|
|
+ enterBool = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -418,7 +418,7 @@
|
|
|
$(obj).closest('li').remove();
|
|
|
gagajf.setCookie('st24ck_today_keyword',keyword, -1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 검색어 입력 후 엔터키
|
|
|
$('#searchMainForm input[name=keyword]').keypress(function (event) {
|
|
|
if (event.which === 13) {
|
|
|
@@ -452,7 +452,7 @@
|
|
|
$.getJSON('/display/recommend/item/list', data, function (result){
|
|
|
$("#recommendItemArea").html('');
|
|
|
$("#recommandArea").show();
|
|
|
-
|
|
|
+
|
|
|
if(result.length > 0){
|
|
|
$.each(result, function (idx, item){
|
|
|
html += '<div class="swiper-slide">\n';
|
|
|
@@ -480,7 +480,7 @@
|
|
|
html += '</div>\n';
|
|
|
});
|
|
|
$("#recommendItemArea").append(html);
|
|
|
-
|
|
|
+
|
|
|
var swiperschProduct4 = new Swiper('.swiper-container.recommand_slide', {
|
|
|
slidesPerView: 2.2,
|
|
|
spaceBetween: 8,
|
|
|
@@ -494,7 +494,7 @@
|
|
|
$("#recommendItemArea").html('');
|
|
|
$("#recommandArea").hide();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|