Преглед изворни кода

최근본상품 건수 처리

gagamel пре 5 година
родитељ
комит
e017e9e0c2
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/main/webapp/WEB-INF/views/web/common/fragments/FooterWeb.html

+ 5 - 1
src/main/webapp/WEB-INF/views/web/common/fragments/FooterWeb.html

@@ -156,7 +156,7 @@
 			<li>
 				<button type="button" id="quick01" class="quick_btn01" data-tab="quick01">
 					<img src="/images/pc/ico_qk_history.png" alt="최근 본 상품"/>
-					<span class="count">30</span>
+					<span class="count"></span>
 				</button>
 			</li>
 			<li>
@@ -925,11 +925,14 @@
 	
 	// 최근본상품
 	let fnGetRecentlyGoods = function() {
+// 	$('#quick01').on('click', function() {
 		$.getJSON('/goods/recently/list'
 				, function(result, status) {
 					if (status == 'success') {
 						$('#quickMenuTodayGoods').html('');
 						
+						$('#quick01').find('span').html(result.length);
+						
 						if (result.length > 0) {
 							let tag = '<div class="product_count"><span class="c_primary">' + result.length + '</span>개의 상품</div>\n';
 							tag += '	<div class="itemsGrp">\n';
@@ -954,6 +957,7 @@
 						}
 					}
 			});
+// 	});
 	}
 	
 	$(document).ready( function() {