<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>{echo:$this->_siteConfig->name}</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	{js:jquery}
	{js:form}
	{js:validate}
	{js:dialog}
	{js:artTemplate}
	<script src='{theme:javascript/site.js}'></script>
	<link rel="stylesheet" href="{skin:style/style.css}">
	<script type='text/javascript' src='{webroot:public/javascript/public.js}'></script>
</head>
<body>
<div class="header_top">
	<div class="web">
		<div class="welcome">
			欢迎您来到 {echo:$this->_siteConfig->name}！
			{if:$this->user}
				<a href="{url:/ucenter/index}">个人中心</a>
				<a href="{url:/simple/logout}">退出</a>
			{else:}
				<a href="{url:/simple/login}">登录</a>
				<a class="reg" href="{url:/simple/reg}">免费注册</a>
			{/if}
		</div>
		<div class="header_cart" name="mycart">
			<a href="{url:/simple/cart}" class="go_cart">
				<i class="icon-shopping-cart"></i>
				购物车（<em class="count" name="mycart_count"]>0</em>）
			</a>
			<div class="cart_simple" id="div_mycart"></div>
		</div>
		<!--购物车模板 开始-->
		<script type='text/html' id='cartTemplete'>
		<div class='cart_panel'>
			<ul class='cart_list'>
				<%for(var item in goodsData){%>
				<%var data = goodsData[item]%>
				<li id="site_cart_dd_<%=item%>">
					<em>共<%=data['count']%>件</em>
					<a target="_blank" href="{url:/site/products/id/<%=data['goods_id']%>}">
						<img src="<%=webroot(data['img'])%>">
						<h5><%=data['name']%></h5>
					</a>
					<span>￥ <%=data['sell_price']%></span>
					<del onclick="removeCart('<%=data['id']%>','<%=data['type']%>');$('#site_cart_dd_<%=item%>').hide('slow');">删除</del>
				</li>
				<%}%>
				<%if(goodsCount){%>
				<div class="cart_total">
					<p>共<span name="mycart_count"><%=goodsCount%></span>件商品</p>
					<p>商品总额：<em name="mycart_sum">￥<%=goodsSum%></em></p>
					<a href="{url:simple/cart}">去购物车结算</a>
				</div>
				<%}else{%>
				<div class='cart_no'>购物车空空如也~</div>
				<%}%>
			</ul>
		</div>
		</script>
		<ul class="top_tool">
			<li><a href="{url:ucenter/index}">个人中心</a></li>
			<li><a href="{url:/simple/seller}">申请开店</a></li>
			<li><a href="{url:/seller/index}">商家管理</a></li>
			<li><a href="{url:/site/help_list}">使用帮助</a></li>
		</ul>
	</div>
</div>

<header class="ucenter">
	<article class="header_top_menu">
		<div class="container">
			<a href="{url:/ucenter/index}" class="ms_logo">
				<img src="{skin:image/ms-logo.png}" alt="">
			</a>
			<ul>
				<li><a href="{url:/site/index}">首页</a></li>
				{foreach:items=Api::run('getGuideList')}
				<li><a href="{url:$item[link]}">{$item['name']}</a></li>
				{/foreach}
			</ul>
		</div>
	</article>
	<article class="header_bottom"></article>
</header>

<div class="bigweb">
	<section class="web">
		<section class="main ucenter_main">
			{viewcontent}
		</section>
		<aside class="bar ucenter_bar">
			<nav class="user_bar">
				<h3>
					<a href="{url:simple/cart}">
						<i class="icon-shopping-cart"></i>
						我的购物车
					</a>
				</h3>
			</nav>
			{set:$index=0;}
			{foreach:items=menuUcenter::init()}
			{set:$index++;}
			<nav class="user_bar">
				<h3><i></i>{$key}</h3>
				<ul>
					{foreach:items=$item key=$moreKey item=$moreValue}
					<li><a title="{$moreValue}" href="{url:$moreKey}">{$moreValue}</a></li>
					{/foreach}
				</ul>
			</nav>
			{/foreach}
		</aside>
	</section>
</div>

<!-- 底部 -->
<footer class="foot">
	<section class="service">
		<ul>
			<li class="item1">
				<img src="{skin:image/a1.png}" alt="">
				<div>
					<p><strong><a href="">正品保障</a></strong></p>
					<p>正品保障，提供发票</p>
				</div>
			</li>
			<li class="item2">
				<img src="{skin:image/a2.png}" alt="">
				<div>
					<p><strong><a href="">急速物流</a></strong></p>
					<p>急速物流，急速送达</p>
				</div>
			</li>
			<li class="item3">
				<img src="{skin:image/a3.png}" alt="">
				<div>
					<p><strong><a href="">无忧售后</a></strong></p>
					<p>7天无理由退换货</p>
				</div>
			</li>
			<li class="item4">
				<img src="{skin:image/a4.png}" alt="">
				<div>
					<p><strong><a href="">特色服务</a></strong></p>
					<p>私人订制家电套餐</p>
				</div>
			</li>
			<li class="item5">
				<img src="{skin:image/a5.png}" alt="">
				<div>
					<p><strong><a href="">帮助中心</a></strong></p>
					<p>您的购物指南</p>
				</div>
			</li>
		</ul>
	</section>
	<section class="help">
		{set:$catIco = array('help-new','help-delivery','help-pay','help-user','help-service')}
		{foreach:items=Api::run('getHelpCategoryFoot') item=$helpCat}
		<dl class="help_{echo:$key+1}">
			<dt>{$helpCat['name']}</dt>
			{foreach:items=Api::run('getHelpListByCatidAll',array('#cat_id#',$helpCat['id']))}
			<dd><a href="{url:/site/help/id/$item[id]}">{$item['name']}</a></dd>
			{/foreach}
		</dl>
		{/foreach}
		<div class="contact">
			<em>400-888-8888</em>
			<span>周一到周日 8:00-18:00</span>
			<span>（仅收市话费）</span>
			<div><i class="icon-comments"></i> 24小时在线客服</div>
		</div>
	</section>
	<section class="copy">
		{echo:IFilter::stripSlash($this->_siteConfig->site_footer_code)}
	</section>
</footer>



<script>
//DOM加载完毕后运行
$(function(){
	//隔行换色
	$(".list_table tr:nth-child(even)").addClass('even');
	$(".list_table tr").hover(
		function () {
			$(this).addClass("sel");
		},
		function () {
			$(this).removeClass("sel");
		}
	);

	//按钮高亮
	var localUrl = "{echo:IUrl::getUri()}";
	$('a[href^="'+localUrl+'"]').parent().addClass('current');
});
</script>
</body>
</html>
