<?php /* Smarty version Smarty-3.0.8, created on 2017-08-03 19:23:07
         compiled from "/www/wwwroot/www.mxszpt.com/kanjia/tpl/self.html" */ ?>
<?php /*%%SmartyHeaderCode:18304646455983079b0f5136-99213307%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a192f2b4a08f534192266848ec772baacdb3036e' => 
    array (
      0 => '/www/wwwroot/www.mxszpt.com/kanjia/tpl/self.html',
      1 => 1501755554,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18304646455983079b0f5136-99213307',
  '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>
<div class="orderlist-extend">
	<header id="">
			<ul>
				<li class="current" data-key="tuwen">
				<a href="javascript:void(0);">进行中活动</a></li>
				<li ><a href="javascript:void(0);">已完成活动</a></li>
				<li ><a href="javascript:void(0);">未完成活动</a></li>
			</ul>
		</header>
</div>		
<section class="orderlist_extend_body">	
<!--正在进行活动-->
<div class="content-item orderlist_all orderlist0" style="display: block";>
	<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('joina')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->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['value']->value['pic'];?>
">
			</div>
			<div class="ry-index-r">
				<div class="r1"><?php echo $_smarty_tpl->tpl_vars['value']->value['title'];?>
<span class="ry-have-kanjia"><i>
	                  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['value']->value['kjnum'];?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==null){?>
	                  0
	                  <?php }else{ ?>  
	                  <?php echo $_smarty_tpl->tpl_vars['value']->value['kjnum'];?>

	                  <?php }?> 
	                    </i>人帮你砍价</span></div>
				<div>
					<h3 class="ry-end-time">距活动结束时间还有：</h3>
				   <div class="ry-content">
						<div id="1" class="settime" endTime="<?php echo $_smarty_tpl->tpl_vars['value']->value['overtime'];?>
"></div>
				   </div>
			  </div>
			  <div class="ry-kanjia-jiage">
			  	<ul style="text-align: left;">
			  		<li>原价：<?php echo $_smarty_tpl->tpl_vars['value']->value['yprice'];?>
元</li><br />
			  		<li>已砍：<span style="color: red;"><?php echo $_smarty_tpl->tpl_vars['value']->value['shopprice']-$_smarty_tpl->tpl_vars['value']->value['kjprice'];?>
</span>元</li>
			  		<li style="clear: both;">目标砍价：<span style="color: red;"><?php echo $_smarty_tpl->tpl_vars['value']->value['shopprice']-$_smarty_tpl->tpl_vars['value']->value['minprice'];?>
</span>元</li>
			  		<li style="clear: both;">还剩：<span style="color: red;"><?php echo $_smarty_tpl->tpl_vars['value']->value['kjprice']-$_smarty_tpl->tpl_vars['value']->value['minprice'];?>
</span>元达标</li>
			  	</ul>
			  </div>
              <?php if ($_smarty_tpl->tpl_vars['value']->value['yesnoorder']=="1"){?>
              <div class="ry-kanjia-btn">已生成订单</div>
              <?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'=>'baominga','id'=>$_smarty_tpl->tpl_vars['value']->value['shopid'],'openid'=>$_smarty_tpl->getVariable('openid')->value,'userid'=>$_smarty_tpl->tpl_vars['value']->value['userid']),$_smarty_tpl);?>
"><img src="images/ck.jpg"></a></div>
              <?php }?>
			  
			</div>
		</div>
	</div>
	<?php }} ?>
    <br /><br /><br /><br />
</div>

<!--已完成活动-->
<div class="content-item orderlist_daifahuo  orderlist1" style="display: none;">
<?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('joinb')->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['title'];?>

					<span class="ry-have-kanjia">
						<i>
			                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['val']->value['kjnum'];?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==null){?>
			                  	0
			                <?php }else{ ?>  
			                  	<?php echo $_smarty_tpl->tpl_vars['val']->value['kjnum'];?>

			                <?php }?> 
		            	</i>人帮你砍价
		            </span>
	            </div>
				<div>
			  </div>
			  <div class="ry-kanjia-jiage">
			  	<ul style="text-align: left;">
			  		<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['minprice'];?>
</span>元</li>
			  		<li style="clear: both;">幸运之神：<?php echo $_smarty_tpl->tpl_vars['val']->value['zuijianame'];?>
</li>
			  		<li style="clear: both;">帮你砍了：<?php echo $_smarty_tpl->tpl_vars['val']->value['zuijiaprice'];?>
</li>
			  	</ul>
			  </div>
               <?php if ($_smarty_tpl->tpl_vars['val']->value['yesnoorder']=="1"){?>
              <div class="ry-kanjia-btn">已生成订单</div>
              <?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'=>'order','id'=>$_smarty_tpl->tpl_vars['val']->value['id']),$_smarty_tpl);?>
"><img src="images/scdd.jpg"></a></div>
              <?php }?>
			</div>
		</div>
	</div>
<?php }} ?>
<br /><br /><br /><br />
</div>
<!--未完成活动-->
<div class="content-item orderlist_daifahuo  orderlist2" style="display: none;">
<?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('joinc')->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['title'];?>

					<span class="ry-have-kanjia">
						<i>
			                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['val']->value['kjnum'];?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==null){?>
			                  	0
			                <?php }else{ ?>  
			                  	<?php echo $_smarty_tpl->tpl_vars['val']->value['kjnum'];?>

			                <?php }?> 
		            	</i>人帮你砍价
		            </span>
	            </div>
				<div>
			  </div>
			  <div class="ry-kanjia-jiage">
			  	<ul style="text-align: left;">
			  		<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['kjprice'];?>
</span>元</li>
			  		<li style="clear: both;">幸运之神：<?php echo $_smarty_tpl->tpl_vars['val']->value['zuijianame'];?>
</li>
			  		<li style="clear: both;">帮你砍了：<?php echo $_smarty_tpl->tpl_vars['val']->value['zuijiaprice'];?>
</li>
			  	</ul>
			  </div>
               <?php if ($_smarty_tpl->tpl_vars['val']->value['yesnoorder']=="1"){?>
              <div class="ry-kanjia-btn">已生成订单</div>
              <?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'=>'order','id'=>$_smarty_tpl->tpl_vars['val']->value['id']),$_smarty_tpl);?>
"><img src="images/scdd.jpg"></a></div>
               <?php }?>
			</div>
		</div>
	</div>
<?php }} ?>
<br /><br /><br /><br />
</div>
</section>
    
</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>
     <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
  <script type="text/javascript">
	  wx.config({
	    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。true,false
	    appId: "<?php echo $_smarty_tpl->getVariable('config')->value['appid'];?>
", // 必填，公众号的唯一标识
	    timestamp: "<?php echo $_smarty_tpl->getVariable('signPackage')->value['timestamp'];?>
", // 必填，生成签名的时间戳
	    nonceStr: "<?php echo $_smarty_tpl->getVariable('signPackage')->value['nonceStr'];?>
", // 必填，生成签名的随机串
	    signature: "<?php echo $_smarty_tpl->getVariable('signPackage')->value['signature'];?>
",// 必填，签名，见附录1
	    jsApiList: ['onMenuShareAppMessage','onMenuShareTimeline','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
	});
    
 	wx.ready(function() {
 
      });
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
    // 通过下面这个API隐藏右上角按钮
    WeixinJSBridge.call('hideOptionMenu');
    
    
});        
  </script>
</body>    
</html>