<?php /* Smarty version Smarty-3.0.8, created on 2017-07-30 11:44:36
         compiled from "/www/wwwroot/sanweiyuan.cn/tpl/orderlist.html" */ ?>
<?php /*%%SmartyHeaderCode:107863269597d56243b68e6-86162319%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9b1a1c7b04db6f0a36c122694fa51a48583d3040' => 
    array (
      0 => '/www/wwwroot/sanweiyuan.cn/tpl/orderlist.html',
      1 => 1501242604,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '107863269597d56243b68e6-86162319',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<!doctype html>
<html>
<head>
<meta name="keywords" content="<?php echo $_smarty_tpl->getVariable('config')->value['keywords'];?>
" />
<meta name="description" content="<?php echo $_smarty_tpl->getVariable('config')->value['description'];?>
" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>我的订单-<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
</title>
<link rel="stylesheet" type="text/css" href="css/animate.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.ry.css?v=06">
<style>
a:hover{text-decoration:none;}
</style>
</head>
<body style="background:#f2f2f2;">
<!--viewport-->
<div class="viewport">
<!--头部文件-->
<div class="mobc-header">
	<a href="javascript:history.back();"  onclick="return_prepage()" class="returnback">
	<i class="fa fa-angle-left"></i></a>
	<div class="goods-bar">
		<p class="goods-txt">我的订单</p>
	</div>
</div>

<?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('order')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value){
?>
<div class="ry-mall-list" style="margin-top:10px;">
		<div class="ry-index-list">
			<div class="ry-index-l">
				<img src="<?php echo $_smarty_tpl->tpl_vars['val']->value['pic'];?>
">
			</div>
			<div class="ry-index-r">
				<div class="r1"><?php echo $_smarty_tpl->tpl_vars['val']->value['shopname'];?>

					<span class="ry-have-kanjia">
						<i>
			                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['val']->value['yesno'];?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1=="1"){?>
			                  	已付款
			                <?php }else{ ?>  
			                  	已下单
			                <?php }?> 
		            	</i>
		            </span>
	            </div>
			<div>
			  </div>
			  <div class="ry-kanjia-jiage">
			  	<ul>
			  		<li>原价：<?php echo $_smarty_tpl->tpl_vars['val']->value['yprice'];?>
元</li><br />
			  		<li>现价：<span style="color: red;"><?php echo $_smarty_tpl->tpl_vars['val']->value['price'];?>
</span>元</li>
			  		<li style="clear: both;">购买名：<?php echo $_smarty_tpl->tpl_vars['val']->value['username'];?>
</li>
			  		<li style="clear: both;">下订时间：<?php echo $_smarty_tpl->tpl_vars['val']->value['addtime'];?>
</li>
			  	</ul>
			  </div>
			  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['val']->value['yesno'];?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2=="1"){?>
			  
              <?php }else{ ?>  
              <div class="ry-kanjia-btn"><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'ordercancel','id'=>$_smarty_tpl->tpl_vars['val']->value['id']),$_smarty_tpl);?>
" onclick="return confirm('确定取消该订单?')"><img src="images/qxdd.jpg"></a></div>
			  <?php }?>
			</div>
		</div>
	</div>
<?php }} ?>
<?php if (empty($_smarty_tpl->getVariable('order',null,true,false)->value)){?>
	<div style="width:150px;height:150px;margin:10px auto;">
		<img src="images/none.png" alt="" style="width:100%;"/>
	</div>
<?php }?>
</div>	
<!--viewport结束-->
<!--底部按钮-->	
<div class="ry-bottom-meun">
	<ul class="ry-p-ul1">
		<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'index'),$_smarty_tpl);?>
"><img src="images/home.png"><p>首页</p></a></li>
		<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'self'),$_smarty_tpl);?>
"><img src="images/me.png"><p>我的</p></a></li>
	</ul>
	<ul class="ry-p-ul2">
		<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'orderlist'),$_smarty_tpl);?>
" class="ry-yaoqing">我的订单</a>
	</ul>	
</div>

<script src="js/jquery-1.12.3.min.js" type="text/javascript"></script>
<script>
  
  $(function(){
  	updateEndTime();
    //订单状态点击事件
    $('.orderlist-extend li').each(function(i){
	  	$(this).on('click',function(){
	  		$(this).addClass('current').siblings().removeClass('current');
	  		$('.orderlist'+i).show().siblings().hide();
	  	});
    });
	
	//去掉最后一个单元格的右边框
	$('.ry-tb-content td').last().css('border-right','0px');
  });

  //倒计时函数
	function updateEndTime()
	{
		var date = new Date();
		var time = date.getTime(); 
		//当前时间距1970年1月1日之间的毫秒数
		$(".settime").each(function(i){
		var endDate =this.getAttribute("endTime"); //结束时间字符串
		//转换为时间日期类型
		var endDate1 = eval('new Date(' + endDate.replace(/\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) +')');
		var endTime = endDate1.getTime(); //结束时间毫秒数
		var lag = (endTime - time) / 1000; //当前时间和结束时间之间的秒数
		if(lag > 0)
		{
		var second = Math.floor(lag % 60); 
		var minite = Math.floor((lag / 60) % 60);
		var hour = Math.floor((lag / 3600) % 24);
		var day = Math.floor((lag / 3600) / 24);
		$(this).html("<span>"+day+"</span>"+"天"+"<span>"+hour+"</span>"+"小时"+"<span>"+minite+"</span>"+"分"+"<span>"+second+"</span>"+"秒");
		}
		else{
			$(this).removeClass("settime");
			$(this).html("活动时间结束");
		}
	});
		setTimeout("updateEndTime()",1000);
	}
  
  </script>
</body>    
</html>