<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="__STATIC__/css/reset.css">
<link rel="stylesheet" href="__STATIC__/css/swiper.css">
<link rel="stylesheet" href="__STATIC__/css/maiqi.css" />
<!--<link rel="stylesheet" href="__STATIC__/css/vip.css">-->
<script src="__STATIC__/js/jquery-2.1.0.js"></script>
<script src="__STATIC__/js/flexible.min.js"></script>
<script src="__STATIC__/js/swiper.js"></script>
<title>商城首页</title>
<style type="text/css">
	.s_bp_jf {
	    background-image: url(__STATIC__/images/img/dd_scp_mx.png);
	    background-repeat: no-repeat;
	    background-position: left center;
	    background-size: auto 90%;
	    padding-left: 15px;
	}
    .sc_con {
        height: auto;
        width: 100%;
        border-top: 1px solid #e7e7e7;
        display: inline-block;
    }
    .sc1_nav {
        float: left;
        height: auto;
        width: 50%;
        border-bottom: 1px solid #e7e7e7;
        background-color: #FFF;
    }
    .sc1_nav:nth-child(odd) {
        border-right: 1px solid #e7e7e7;
    }
    .sc1_nav img {
        margin: auto;
        height: 10vw;
        width: 10vw;
        padding-top: 18px;
        margin-left: 5%;
        box-sizing: content-box;
    }
    .sc1_nav strong span {
        margin: auto;
        height: auto;
        width: 100%;
        display: inline-block;
        font-size: 0.3rem;
        color: #333;
        line-height:15px;
        padding-top: 10px;
        float:left;
        clear:both;
    }
    .sc1_nav strong small {
        margin: auto;
        height: auto;
        width: 100%;
        display:inline-block;
        font-size: 0.2rem;
        color: #999;
        line-height:15px;
        margin-bottom:20px;
        float:left;
        clear:both;
    }
    .sc1_nav strong {
        float: left;
        height: auto;
        width: 60%;
        font-weight: normal;
        padding-left:15%;
        margin-top:15px;
    }
    .s_search input {
	    width: 6.2rem;
	}
	.s_search {
	    width: 7.3rem;
	}	
    /*.sc_cc {*/
        /*clear: both;*/
        /*float: left;*/
        /*height: auto;*/
        /*width: 100%;*/
        /*margin-bottom: 10px;*/
        /*background-color: #FFF;*/
        /*padding-right: 15px;*/
        /*padding-left: 15px;*/
    /*}*/
    /*.sc_cc .s_cz_nav a{ margin-top:10px; margin-bottom:10px;}*/




</style>
</head>

<body>
	<div class="main">
		 <div class="s_top">
			<!-- <div class="s_city">南宁</div> -->
			<a href="{$Think.session.addr}/front/index/sousuo" class="s_search">
				<span></span>
				<input type="text" value="" placeholder="请输入搜索内容">
			</a>
		</div>
		<!-- 轮播图 -->
		<div class="s_swiper">
			<?php if(!empty($advon)){ ?>
		    <div class="swiper-container" id="top_focus">
		        <div class="swiper-wrapper">
		            <?php foreach($advon['img'] as $k=>$v){?>
		            <div class="swiper-slide"><a href="{$advon['link'][$k]}"><img src="{$Think.session.addr}/public/uploads/{$v}" /></a></div>
		            <?php } ?>
		        </div>
		        <!-- 如果需要分页器 -->
		        <div class="swiper-pagination"></div>
		    </div>
			<?php }?>
		</div>

        <!--如果有分类 则展示-->
        <?php if(!empty($catearr)){ ?>
        <div class="s_nr">
            <div class="sc_con">
                <foreach name="catearr" item="v">
                    <a href="{:U('Mobile/Goods/goodslist',array('cateid'=>$v[id],'levelid'=>$levelid))}" class="sc1_nav">
                        <strong><span>{$v['name']}</span><small>{$v['englishname']}</small></strong>
                        <img src="{$v['image']}"></a>
                </foreach>
            </div>
        </div>

        <!--<div class="s_nr">-->
            <!--<div class="sc_nav_con">-->
                <!--<volist name="catearr" id="v">-->
                    <!--<a href="{:U('Mobile/Goods/goodslist',array('cateid'=>$v[id],'levelid'=>$levelid))}" class="sc_nav"><img src="{$v['image']}"><span>{$v['name']}</span></a>-->
                <!--</volist>-->
            <!--</div>-->
        <!--</div>-->


        <?php }?>

		<!-- 轮播图 ------end-->
		<div class="s_nr">
			<div class="sc_nav_con">
				<a href="/mobile/User/collect_list" class="sc_nav"><img src="__STATIC__/images/sc_nav02.png"><span>我的收藏</span></a>
				<a href="/mobile/Order/order_list" class="sc_nav"><img src="__STATIC__/images/sc_nav03.png"><span>我的订单</span></a>
				<a href="/mobile/User/address_list" class="sc_nav"><img src="__STATIC__/images/sc_nav04.png"><span>我的地址</span></a>
			</div>

            <?php if(empty($catearr)){ ?>
			<div class="sc_nav_con">
				 <volist name="levelarr" id="v">
		        	<a href="/mobile/Goods/catelist/levelid/{$v['id']}" class="sc_nav"><img src="__STATIC__/images/img/sc_nav{$key+9}.png"><span>{$v['name']}商城</span></a>
		        </volist>
			</div>
            <?php }?>			
		</div>
		<div class="s_nr">
			<div class="s_nr_title">
				<small></small>
				<span>热门商品</span>
				<!-- <a href="javascript:void(0)">更多</a> -->
			</div>
			<div class="swiper-container" id="sc_remen">
	            <div class="swiper-wrapper">
					<foreach name="hot_goods" item="v">
	                	<if condition="$key==0 || ($key)%4==0">
		                <div class="swiper-slide">
		                    <div class="s_jf_pic wbg">
						</if>
							<a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}" class="s_jfd">
								<img src="{$v[goods_id]|goods_thum_images=400,400}">
								<strong>{$v[goods_name]|getSubstr=0,20}</strong>
								<span>￥{$v['shop_price']}</span>
								<if condition="$v['exchange_integral'] gt -1">
									<span class="">{$v['shop_price']*$duihuan}积分</span>
                        		</if>
							</a>
							<if condition="$key !=0 && ($key-3)%4==0">
								</div>
			                </div>
	                	</if>  
					</foreach>
	            </div>
	        </div>
	        <div class="sc_hyp_btn sc_remen_btn"><a href="javascript:void(0)">换一批看看</a></div>
	    </div>

	   <!--  <div class="s_nr">
			<div class="s_nr_title">
				<small></small>
				<span>猜你喜欢</span>
			</div>
			<div class="swiper-container" id="sc_cai">
	            <div class="swiper-wrapper">
	                <foreach name="favourite_goods" item="v">
	                 	<if condition="$key==0 || ($key)%4==0">
		                <div class="swiper-slide">
		                    <div class="s_jf_pic wbg">
						</if>
							<a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}" class="s_jfd">
								<img src="{$v[goods_id]|goods_thum_images=400,400}">
								<strong>{$v[goods_name]|getSubstr=0,20}</strong>
								<span>￥{$v['shop_price']}</span>
								<if condition="$v['exchange_integral'] gt -1">
									<span class="">{$v['shop_price']*$duihuan}积分</span>
                        		</if>
							</a>
							<if condition="$key !=0 && ($key-3)%4==0">
								</div>
			                </div>
	                	</if>  
					</foreach>
	            </div>
	        </div>
	        <div class="sc_hyp_btn sc_cai_btn"><a href="javascript:void(0)">换一批看看</a></div>
	    </div> -->
	</div>
	<include file="./public/commonality" />
	<script>
  	//顶部轮播
    var swiper1 = new Swiper('#top_focus', {
      pagination: {
        el: '#top_focus_pg',
      },
      loop : true,
      autoplay: {
	    delay: 3000,//轮播速度
	    stopOnLastSlide: false,//是否停在最后一张
	    disableOnInteraction: false,//用户操作完成之后是否还继续轮播
	    },
    });
    //热门商品换一批
    var swiper2 = new Swiper('#sc_remen',{
		loop : true,
		effect : 'fade',
	  });
	  $('.sc_remen_btn').click(function(){
		swiper2.slideNext();
	});
    //品牌热推换一批
    var swiper3 = new Swiper('#sc_pinpai',{
		loop : true,
		effect : 'fade',
	  });
	  $('.sc_pinpai_btn').click(function(){
		swiper3.slideNext();
	});
    //猜你喜欢换一批
    var swiper4 = new Swiper('#sc_cai',{
		loop : true,
		effect : 'fade',
	  });
	  $('.sc_cai_btn').click(function(){
		swiper4.slideNext();
	});
  	</script>

</body>
</html>