<?php /* Smarty version Smarty-3.0.8, created on 2017-07-30 10:49:41
         compiled from "/www/wwwroot/sanweiyuan.cn/tpl/my.html" */ ?>
<?php /*%%SmartyHeaderCode:69795781597d49450c2fd7-09713095%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a3a6987e41b7864612d41894e47c9ab20dd1eb1b' => 
    array (
      0 => '/www/wwwroot/sanweiyuan.cn/tpl/my.html',
      1 => 1501381474,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '69795781597d49450c2fd7-09713095',
  '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('shop')->value['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>
	.jiathis_style_32x32{position:fixed ;left:0;bottom:45px;width:100%;background:#fff;height:90px;border:1px solid #d1d1d1;display: none;}
	.jiatitle{width:100px;margin:2px auto;}
	.jiathis_style_32x32 ul li{float:left;width:50px;list-style: none;margin:20px 0px 0px 20px;}
</style>
</head>

<!--<body style="background: #f2f2f2;" onload="window.location.Reload();">-->
<body style="background: #f2f2f2;">
<!--viewport-->
<div class="viewport">
<div class="headbg">
	<img src="<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
">
   <div class="ry-product-et">
			<div class="ry-product-left">距结束：</div><div id="1" class="settime ry-product-right" endTime="<?php echo $_smarty_tpl->getVariable('shop')->value['overtime'];?>
"></div>
	</div>
</div>
<div class="ry-other-jindu"  style="padding: 20px;">
	<div class="progress_container">
		<div class="progress_bar tip" title="<?php echo $_smarty_tpl->getVariable('percent')->value;?>
%"></div>
	</div>
	<div style="width:100%;height:15px;margin-top:2px;">
		<img src="images/percent.png" alt="" style="height:15px;width:100%">
	</div>
	<div style="width:100%;margin-top:3px;">
		<div class="percent_start">0</div>
		<div class="percent_end"><?php echo $_smarty_tpl->getVariable('miprice')->value;?>
</div>
	</div>
	<br/>
	<?php if ($_smarty_tpl->getVariable('target')->value==1){?>
	<div class="ry-kanjia-target">
	    <p class="ry-kanjia-p">
	    	已砍:¥<?php echo $_smarty_tpl->getVariable('klprice')->value;?>
,离完成目标仅差:¥<?php echo $_smarty_tpl->getVariable('mprice')->value;?>
元
	    </p>
	</div>
	<?php }else{ ?>
		<div class="ry-kanjia-targets">
	    <p class="ry-kanjia-p">
	    	已砍:¥<?php echo $_smarty_tpl->getVariable('klprice')->value;?>
元,已完成目标
	    </p>
	</div>
	<?php }?>
<p>现价:<span>¥<?php echo $_smarty_tpl->getVariable('kjprice')->value;?>
</span></p>
</div>

<!--商品列表-->
  <div class="ry-my-jiage">
  <p class="ry-my-name">亲爱的<span><?php echo $_smarty_tpl->getVariable('peoples')->value['nickname'];?>
</span></p>
	<p class="ry-my-content">已有<span><?php echo $_smarty_tpl->getVariable('helpcount')->value;?>
</span>位帮你砍价，砍价最高的是<span><?php echo $_smarty_tpl->getVariable('shophelp')->value[0]['username'];?>
</span>，帮砍了<span>¥<?php echo $_smarty_tpl->getVariable('shophelp')->value[0]['kjprice'];?>
</span></p>
  </div>
<div class="ry-product-guize">
	<h3 class="ry-kanjia-qyt">亲友团<i class="fa fa-angle-down ry-kanjia-icon"></i></h3>
<div class="ry-other-table" style="display:none;">
		<table class="table">
		  <thead>
		    <tr>
		      <th style="width: 30%">亲友团</th>
		      <th style="width: 30%">砍掉</th>
		      <th style="width: 40%">砍后</th>
		    </tr>
		  </thead>
		  <tbody class="ry-other-body">
		  	<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('help')->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){
?>
			    <tr>
			      <td><img src="<?php echo $_smarty_tpl->tpl_vars['value']->value['userimg'];?>
"></td>
			      <td>¥<?php echo $_smarty_tpl->tpl_vars['value']->value['kjprice'];?>
</td>
			      <td>¥<?php echo $_smarty_tpl->tpl_vars['value']->value['kjhprice'];?>
</td>
			    </tr>
			<?php }} ?>
		  </tbody>
		</table>
	</div>	
</div>


<div class="ry-product-guize">
	<h3 class="ry-kanjia-guize">活动规则<i class="fa fa-angle-down ry-kanjia-icon"></i></h3>
	<div class="ry-guize-content">
		<p><?php echo $_smarty_tpl->getVariable('shop')->value['guize'];?>
</p>
	</div>
</div>


<div class="clearfix"></div>
<div class="ry-product-detail">
	<h3>图文详情</h3>
	<input type="hidden" value="<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
" id="whoshop"/>
<input type="hidden" value="<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
" id="whouser"/>
<input type="hidden" value="<?php echo $_SESSION['userinfo']['id'];?>
" id="userid"/>
<input type="hidden" value="<?php echo $_smarty_tpl->getVariable('openid')->value;?>
" id="openid"/>
<input type="hidden" value="<?php echo $_smarty_tpl->getVariable('percent')->value;?>
" id="percent"/>
	<p><?php echo $_smarty_tpl->getVariable('shop')->value['xiangqing'];?>
</p>
</div>
<div class="clearfix"></div>

</div>
<!--底部按钮-->	
<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','openid'=>$_smarty_tpl->getVariable('openid')->value),$_smarty_tpl);?>
"><img src="images/me.png"><p>我的</p></a></li>
	</ul>
	<ul class="ry-p-ul2">
    <?php if ($_smarty_tpl->getVariable('target')->value==1){?>
		<?php if ($_smarty_tpl->getVariable('static')->value==1){?>
			<a class="ry-yaoqing">点击右上角分享</a>
		<?php }else{ ?>
			<a class="ry-kanjia-act">自砍一刀</a>
		<?php }?>
	<?php }else{ ?>
	<a>已完成</a>
	<?php }?>
	</ul>	
</div>	


<!--自砍一刀弹窗-->
<div class="ry-my-layer">
	<div class="ry-my-show" style="z-index:100;">
		<ul>
			<li class="ry-my1 animated rollIn"><img src="images/futou.png"></li>
			<li class="ry-my2"><p class="ry-chenggong" id="zuli"></p><p class="ry-jiage animated zoomInDown" id="jiage"></p></li>
		</ul>
		<div class="ry-my-close clearfix"><a>关闭</a></div>
	</div>
</div>
</body>
<script src="js/jquery-1.12.3.min.js" type="text/javascript"></script>
<script src="js/jquery.tips.js" type="text/javascript"></script>
<script src="js/jquery.myProgress.js" type="text/javascript"></script>
<!--进度条特效-->
<script type="text/javascript">
$(document).ready(function(){

	var percent = $('.progress_bar').attr('title');
	$(".progress_bar").animate({width:percent},1000);
	$(".tip").tipsy({gravity:'s',fade:false});
});
</script>

<script language="javascript">
	$(function(){
	updateEndTime();
	
	//价格
	$('.ry-prodct-jiage li:odd').css('width','58%').css('text-align','left');
	$('.ry-prodct-jiage li:even').css('width','42%').css('text-align','left');
	
	//显示规则弹窗
	$('.ry-kanjia-guize').on('click',function(e){
		e.stopPropagation();
		$('.ry-guize-content').slideToggle('fast');
	});

	//显示亲友团弹窗
	$('.ry-kanjia-qyt').on('click',function(e){
		 e.stopPropagation();
		$('.ry-other-table').slideToggle('fast');
	});
	
	//自砍一刀
	$('.ry-kanjia-act').on('click',function(e){
	   $.getJSON("<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'helpajaxnew'),$_smarty_tpl);?>
", { 'whoshop': $('#whoshop').val(),'whouser': $('#whouser').val(),'userid': $('#userid').val()}, 
	   		function(json){
	   			if(json.message==0){
	   			     $('#jiage').html();
	   				$('#zuli').html("此商品您已经助力过了!");
	   			}else{
	   				$('#zuli').html("成功砍掉");
	   				$('#jiage').html("¥"+json.message);
	   			}
			}
		);

		e.stopPropagation();
		$('.ry-my-layer').show();		
	});

	$('.ry-yaoqing').on('click',function(e){
		$('.jiathis_style_32x32').show();
	});

	$('.jiathis_style_32x32').on('click',function(e){
		$('.jiathis_style_32x32').hide();
	})

	$('.ry-my-close').on('click',function(e){
		e.stopPropagation();
		$('.ry-my-layer').hide();
		location.replace(location.href);
	});
	

	
	
});

	//倒计时函数
	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() {

     	wx.onMenuShareAppMessage({
    		title: '<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
', // 分享标题
    		desc: '家私、家电全名疯砍，优质家私，先砍先得。只砍价，不砍人，开心砍价，暑我最低!', // 分享描述
    		link: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
/index.php?c=main&a=helpsajaxs&whoshop=<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
&whouser=<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
', // 分享链接
    		imgUrl: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
', // 分享图标
    		type: '', // 分享类型,music、video或link，不填默认为link
    		dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
    		success: function () { 
        	// 用户确认分享后执行的回调函数
    		},
    		cancel: function () { 
        	// 用户取消分享后执行的回调函数
    		}
		});


		wx.onMenuShareTimeline({
    		title: '<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
', // 分享标题
    		link: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
/index.php?c=main&a=helpsajaxs&whoshop=<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
&whouser=<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
', // 分享链接
    		imgUrl: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
', // 分享图标
    		success: function () { 
        		// 用户确认分享后执行的回调函数
    		},
    		cancel: function () { 
        		// 用户取消分享后执行的回调函数
    		}
		});

		wx.onMenuShareQQ({
    		title: '<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
', // 分享标题
    		desc: '家私、家电全名疯砍，优质家私，先砍先得。只砍价，不砍人，开心砍价，暑我最低!', // 分享描述
    		link: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
/index.php?c=main&a=helpsajaxs&whoshop=<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
&whouser=<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
', // 分享链接
    		imgUrl: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
', // 分享图标
    		success: function () { 
       		// 用户确认分享后执行的回调函数
    		},
    		cancel: function () { 
       		// 用户取消分享后执行的回调函数
    		}
		});

		wx.onMenuShareWeibo({
    		title: '<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
', // 分享标题
    		desc: '家私、家电全名疯砍，优质家私，先砍先得。只砍价，不砍人，开心砍价，暑我最低!', // 分享描述
    		link: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
/index.php?c=main&a=helpsajaxs&whoshop=<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
&whouser=<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
', // 分享链接
    		imgUrl: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
', // 分享图标
    		success: function () { 
       		// 用户确认分享后执行的回调函数
    		},
    		cancel: function () { 
        	// 用户取消分享后执行的回调函数
    		}
		});

		wx.onMenuShareQZone({
    		title: '<?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
', // 分享标题
    		desc: '家私、家电全名疯砍，优质家私，先砍先得。只砍价，不砍人，开心砍价，暑我最低!', // 分享描述
    		link: '<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
/index.php?c=main&a=helpsajaxs&whoshop=<?php echo $_smarty_tpl->getVariable('whoshopid')->value;?>
&whouser=<?php echo $_smarty_tpl->getVariable('whouserid')->value;?>
', // 分享链接
    		imgUrl: 'http://<?php echo $_smarty_tpl->getVariable('config')->value['url'];?>
<?php echo $_smarty_tpl->getVariable('shop')->value['pic'];?>
', // 分享图标
    		success: function () { 
       		// 用户确认分享后执行的回调函数
    		},
    		cancel: function () { 
        	// 用户取消分享后执行的回调函数
    		}
		});

    });
  
	document.addEventListener("WeixinJSBridgeReady",function(){
		WeixinJSBridge.call("showToolbar")
	});            
  </script>
</html>
