<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>我的订单</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="__STATIC__/mui/css/mui.css">
        <link rel="stylesheet" href="__STATIC__/css/swiper.css">
		<link rel="stylesheet" href="__STATIC__/css/reset.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>
	</head>
    <style>
	.mui-content{overflow:hidden;}
	.swiper-pagination-bullet-active {
	    opacity: 1 !important;
	    background: #EFF2F5 !important;
	}
	.swiper-pagination-bullet {
	    width: 8px;
	    height: 8px;
	    display: inline-block;
	    border-radius: 100%;
	    background: #000;
	    opacity: 0.2;
	}
	.dd_search{
	 	border-bottom:1px solid #e7e7e7;
	}
	.dd_bh{border-top:none;}
	.shouhuo{
		float:right;
		color:#cfbb8b;
	}
	/*新加样式     订单查询下拉框*/
	.dd_sar-right{
	    position: absolute;
	    top: 0;
	    right:10px;
	    width:auto;
	    height: 100%;
	}
	.dd_sar_in{
	    padding-right: 40px;
	}
	.dd_search {
	    border-bottom: 1px solid #e7e7e7;
	    position: relative;
	}
	.dd_sar-right select{
	    height: 100%;
	    background: #eee;
	    padding-right: 20px;
	    background-image: url("./img/sel-down.png");
	    background-repeat: no-repeat;
	    background-position: right center;
	    background-size: auto 7px;
	    color: #333;
	    font-size: 0.3rem;
	}
	#swiper1 .swiper-slide img{
        width: 100vw;
        height: 40vw;
    }
	.dd_cc {
	    background-color: #fff;
	}
	.action{
		color: #cfbb8b;
	}
	.action2{
		color: red;
	}
	.nav:nth-child(1){
	    background: url(__PUBLIC__/images/home.png) no-repeat center 0.07rem;
	    background-size: auto 55%;
	}
	.nav:nth-child(2){
	    background: url(__PUBLIC__/images/order.png) no-repeat center 0.07rem;
	    background-size: auto 55%;
	}
	.nav:nth-child(3){
	    background: url(__PUBLIC__/images/shop.png) no-repeat center 0.07rem;
	    background-size: auto 55%;
	}
	.nav:nth-child(4){
	    background: url(__PUBLIC__/images/ucenter.png) no-repeat center 0.07rem;
	    background-size: auto 55%;
	}
	.nav:nth-child(3).active{
		background: url(__PUBLIC__/images/shop_a.png) no-repeat center 0.07rem;
		background-size: auto 55%;
	}
	.dd_bh {
		background: url(__STATIC__/images/img/bg_jg.png) no-repeat 9px center;
		background-color:#fff;
	}
	.dd_list{
	    width: calc(100% - 10px);
	    margin-left: 5px;
	    margin-top: 5px;
	    border-radius: 5px;
	}

	</style>
	<body>
		<div class="mui-content" style="overflow:hidden;">
            <?php if(!empty($adv)){ ?>
			  <div class="swiper-container" id="swiper1">
			        <div class="swiper-wrapper">
			            <?php foreach($adv['img'] as $k=>$v){?>
			            <div class="swiper-slide"><a href="{$adv['link'][$k]}"><img src="{$Think.session.addr}/public/uploads/{$v}" /></a></div>
			            <?php }?>
			        </div>
			        <!-- 如果需要分页器 -->
			        <div class="swiper-pagination"></div>
			    </div>
			<?php }?>
            
            <div class="dd_search">
           
		    <div class="dd_sar" style="position: relative">
		        <input class="dd_sar_in" type="text" value="{$name}" placeholder="查询订单">
		       <!--  <div class="dd_sar-right">
		            <select name="select_type" id="select_type">
		                <option value="1">商品名称</option>
		                <option value="2">收货人手机</option>
		                <option value="3">会员手机</option>
		                <option value="4">会员卡号</option>
		            </select>
		        </div> -->
		    </div>
            <div class="dd_sar_btn" id="select">搜索</div>
            <script>
                $("#select").click(function(){
                	var name = $(".dd_sar_in").val();
					if(name != ""){
						$(".dd_sar_in").val(name);
					}
					if(name !== ""){
						window.location.href= '/index.php/Mobile/Order/order_list?name_select='+name;
					}else{
						window.location.href= '/index.php/Mobile/Order/order_list';
					}
                })
				$(".dd_sar_in").focus(function(){
					$(this).addClass("active");
					});
				$(".dd_sar_in").blur(function(){
					$(this).removeClass("active");
					});
				</script>
            </div>
            <div class="dd_list">
             <if condition="$action eq 'null' ">
             <div class="zannull">
             	<p>您还没有订单哦~</p>
             	</div>
             </if>
              <volist name="lists" id="list">
            	<foreach  name="list.goods_list" item="good">
            	 		
	                 
	                    <div class="dd_bh"><span></span>订单编号：{$list.order_sn} 
	                    <span class="shouhuo">
		                    <?php if($list['order_status'] == 1 && $list['shipping_status'] == 1){?> 
			                    <a class="action" href="{:U('Mobile/Order/order_confirm',array('id'=>$list['order_id']))}">等待收货</a>
			                <?php }elseif($list['order_status'] == 2){ ?>
			                    <a class="action" href="{:U('Mobile/Order/add_comment',['rec_id'=>$good[rec_id]])}">去评价</a>
		                    <?php }elseif($list['order_status'] == 3 && $list['pay_status'] != 3){ ?>
		                    	<a class="action2" href="#">退款中...</a>
		                    <?php }elseif($list['pay_status'] == 3 && $list['order_status'] == 3){ ?>
		                    	<a class="action" href="#">已退款</a>
		                    <?php }?>
	                    </span>
	                    </div>
	                    <a class="dd_con" <if condition="$list.receive_btn eq 1">href="{:U('/Mobile/Order/order_detail',array('id'=>$list['order_id'],'waitreceive'=>1))}" <else/> href="{:U('/Mobile/Order/order_detail',array('id'=>$list['order_id']))}"</if>>
	                    <div class="dd_cc">
	                        <div class="dd_cp"><img src="{$good[goods_id]|goods_thum_images=200,200}"></div>
	                        <div class="dd_cp_nr">{$good.goods_name}</div>
	                        <div class="dd_cp_mx"><span>￥{$good[member_goods_price]}<br>x{$list.count_goods_num}</span></div>
	                        
	                    </div>
	                    <div class="dd_hj">共{$list.count_goods_num}件商品  合计：
	                    <if condition="$list['order_amount'] != '' && $list['integral'] == '' ">
	                    	￥{$list['order_amount']+$list['user_money']}
	                    <elseif condition="$list['order_amount'] == '' && $list['integral'] != ''"/>
	                    	{$list['integral']}积分
	                    <else />
	                    	￥{$list['order_amount']+$list['user_money']}+{$list['integral']}积分
	                    </if>
	                    		
						</div>
						
	                    <?php if($list['order_status'] == 1 && $list['shipping_status'] == 1){?>
	                    <div class="dd_jd_con ddn2">
	                    <?php }elseif($list['order_status'] == 2){?>
	                    <div class="dd_jd_con ddn3">
	                    <?php }elseif($list['order_status'] == 0 || $list['order_status'] == 1){?>
	                    <div class="dd_jd_con ddn1">
	                    <?php }elseif($list['order_status'] == 4){?>
	                    <div class="dd_jd_con ddn4">
	                    <?php }else{?>
	                    <div class="dd_jd_con ddn5">
	                    <?php }?>
	                        <div class="dd_jd_bg"></div>
	                        <div class="dd_jd_line"></div>
	                        <div class="dd_jd_div">
	                            <span class="dd_jd_nav">已成单</span>
	                            <span class="dd_jd_nav">已发货</span>
	                            <span class="dd_jd_nav">已收货</span>
	                            <span class="dd_jd_nav">已评价</span>
	                            
	                        </div>
	                    </div>
	                    </a>
                </foreach>
                </volist>
    
            </div>       
		
        <!-- <div class="nav">
        	<span class="navd"><a href="{$Think.session.addr}/front/index/index" style='color:black'>会员专区</a></span>
            <span class="navd"><a href="{$Think.session.addr}/front/index/newactivity" style='color:black'>最新活动</a></span>
			<span class="navd active"><a href="/Mobile/Index/index" style='color:black'>积分商城</a></span>
            <span class="navd"><a href="{$Think.session.addr}/front/index/myCenter" style='color:black'>个人中心</a></span>
        </div> -->
        <include file="./public/commonality" />
		<script src="__STATIC__/mui/js/mui.min.js"></script>
		<script type="text/javascript" charset="utf-8">
		//评价
		function pingjia(){
			// alert(666);
		}
			// swiper 初始设置
			var mySwiper = new Swiper('#swiper1',{
			    direction: 'horizontal',
			    loop: true,
			    autoplay:true,
			    autoHeight: true,
			    // 如果需要分页器
			    pagination: {
			        el: '.swiper-pagination',
			    },
		
			});
			var gallery = mui('.mui-slider');
				gallery.slider({
				  interval:4000//自动轮播周期，若为0则不自动播放，默认为0；
				});
			
		</script>
	</body>

</html>