<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{kg['category']['title']}} - KGCMS</title>
<meta name="keywords" content="{{kg['category']['seokey']}}" />
<meta name="description" content="{{kg['category']['seodescr']}}" />
<meta name="copyright" content="KGCMS {{kg['server']['KGCMS_VERSION']}}" />
<!-- 自适应移动端 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 禁止缩放 -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="{{kg['tpl_url']}}style/product_list.css">
<script src="{{kg['tpl_url']}}script/jquery-3.0.0.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/bootstrap.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/product_list.js"></script>
</head>
<body>
	<div class="container-fluid ngcon-style">
		{%- include 'component_header.tpl' %}
		<div class="row">
			<div class="col-md-3">
				<div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
					<ul class="nav bs-docs-sidenav" id="left-nav">
						{%- for row in  kg['category']['id']|category() %}
						<li {% if row['id'] == kg['category']['id'] %}class="active"{% endif %}><a href="{{row['url']}}"><span class="iconfont icon-dian"></span>{{ row['title']}}</a>
						{%- endfor -%}
					</ul>
				</div>
			</div>
			<div class="col-md-9 ngma-Q ngNo-padding">
				<div class="panel panel-default ngNo-margin ngsty-Opan No-shadow">
					<div class="panel-body ngNo-padding ngjs-jh">
						<h1 class="page-title sty-title h1I">{{kg['category']['title']}}</h1>
						<hr class="hr-Rsty ngph-hr1">
						<div class="stime"><div class="ng-clear"></div></div>
						<!-- 排序,模式 -->
						<div class="product-search-sort clearfix">
							<div class="product-search-sort-item all {% if kg['sort'][0] == 0 %}active{% endif %}">
								<a class="product-search-sort-item-word active" href="product?{{sort_url}}sort=0">综合<strong>&nbsp;↓</strong></a>
							</div>
							<div class="product-search-sort-item sale {% if kg['sort'][0] == 1 %}active{% endif %}">
								<a class="product-search-sort-item-word" href="product?{{sort_url}}sort=1">销量<strong>&nbsp;↓</strong></a>
							</div>
							<div class="product-search-sort-item goodReview {% if kg['sort'][0] == 2 %}active{% endif %}">
								<a class="product-search-sort-item-word" href="product?{{sort_url}}sort=2">好评<strong>&nbsp;↓</strong></a>
							</div>
							<div class="product-search-sort-item priceDescend {% if kg['sort'][0] == 3 %}active{% endif %}">
								<a class="product-search-sort-item-word" href="product?{{sort_url}}sort=3">价格从高到低<strong>&nbsp;↓</strong></a>
							</div>
							<div class="product-search-sort-item priceAscend {% if kg['sort'][0] == 4 %}active{% endif %}">
								<a class="product-search-sort-item-word" href="product?{{sort_url}}sort=4">价格从低到高<strong>&nbsp;↑</strong></a>
							</div>
							<div class="pull-right">
								<a class="pattern {% if kg['cookie'].get('KGCMS_PAGE_VIEW', 'simple') == 'simple' %}active{% endif %}" id="grid" href="javascript:void(0);" title="网格模式"><span class="am-icon am-icon-th-large"></span></a>
								<a class="pattern {% if kg['cookie'].get('KGCMS_PAGE_VIEW', '') == 'list' %}active{% endif %}" id="list" href="javascript:void(0);" title="列表模式" style="margin-left:15px"><span class="am-icon am-icon-align-justify"></span></a>
							</div>
						</div>
						<!-- 排序,模式end -->
						<!-- 网格模式 -->
						{%- set product = kg['sort'][1]|product_page(8, 0, kg['category']['id'], 0, 2) %}
						<ul class="image-grid clear ngjs-yo ngsty-ul" {% if kg['cookie'].get('KGCMS_PAGE_VIEW', '') == 'list' %}style="display: none"{% endif %}>
						{% if product['list'] %}
							{%- for row in product['list'] %}
							<li class="ngjs-ms">
								<a href="product?id={{row['id']}}">
									<div class="product_a">
										<div style="padding: 5px;">
											<span><img src="{% if row['thumbnail'] %}{{row['thumbnail']}}{% else %}{{kg['tpl_url']}}/image/not_picture.jpg{% endif %}" alt=""  height="150" width="210"></span>
											<div class="price">¥<strong>{{row['min_price']}}</strong></div>
											<span><h2 class="ngsty-Ihe">{{row['title']}}</h2></span>
											<div class="product_btn">
												<button onclick="window.location.href = 'product?id={{row['id']}}'" class="am-btn am-btn-blue am-radius am-btn-xs">立即购买</button>
												<button onclick="window.location.href = 'product?id={{row['id']}}'" class="am-btn am-btn-secondary am-radius am-btn-xs"><span class="am-icon-shopping-cart">&nbsp;</span>加入购物车</button>
											</div>
										</div>
									</div>
								</a>
								<span class="bottom"></span>
							</li>
							{%- endfor %}
						{%- else %}
							<!-- 没有相关数据 -->
							 <div class="No-content">{{kg['lang'][0]}}</div>
						{%- endif %}
						</ul>
						<!-- 网格模式end -->
						<!-- 列表模式 -->
						<div class="ngsty-ul pattern_list"  {% if kg['cookie'].get('KGCMS_PAGE_VIEW', 'simple') == 'simple' %}style="display: none"{% endif %}">
						{%- if product['list'] %}
							{%- for row in product['list'] %}
								<div class="media">
									<div class="media-left media-top">
										<a href="product?id={{row['id']}}">
											<img class="media-object" src="{% if row['thumbnail'] %}{{row['thumbnail']}}{% else %}{{kg['tpl_url']}}/image/not_picture.jpg{% endif %}" alt="" width="100">
										</a>
									</div>
									<div class="media-body">
										<a class="product_tit" href="product?id={{row['id']}}"><h4 class="media-heading">{{row['title']}}</h4></a>
										<div class="price pull-left" style="margin-right: 50px;">¥<strong>{{row['min_price']}}</strong></div>
										<div class="product_btn text-left" style="padding: 0;"><button onclick="window.location.href = 'product?id={{row['id']}}'" class="am-btn am-btn-danger am-radius am-btn-xs">立即购买</button></div>
									</div>
								</div>
							{%- endfor %}
						{%- else %}
							<!-- 没有相关数据 -->
							<div class="No-content">{{kg['lang'][0]}}</div>
						{%- endif %}
						</div>
						<!-- 列表模式end -->
					</div>
				</div>
				<hr class="hr-Rsty foo-sty foo-ot">
				{% if product['page_data']['total_page'] > 1 %}
				{{product['page_html']}}
				{% endif %}
			</div>
		</div>
		{% include 'component_footer.tpl' %}
	</div>
</body>
</html>
<script>

</script>