<?php /* Smarty version Smarty-3.0.8, created on 2017-07-30 10:49:36
         compiled from "/www/wwwroot/sanweiyuan.cn/tpl/product.html" */ ?>
<?php /*%%SmartyHeaderCode:1631292643597d494062eb89-87156034%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f05fc788756259a894f87ae4b772738d3f2739ff' => 
    array (
      0 => '/www/wwwroot/sanweiyuan.cn/tpl/product.html',
      1 => 1501242604,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1631292643597d494062eb89-87156034',
  '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/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">
</head>

<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-prodct-jiage">
  	<ul>
  		<li>原价：<?php echo $_smarty_tpl->getVariable('shop')->value['yprice'];?>
元</li>
  		<li>可砍到：<?php echo $_smarty_tpl->getVariable('shop')->value['minprice'];?>
元</li>
  		<li style="clear: both;">剩余数量：<?php if (empty($_smarty_tpl->getVariable('shop',null,true,false)->value['num'])){?>无限制<?php }else{ ?><?php echo $_smarty_tpl->getVariable('shop')->value['num'];?>
<?php }?></li>
        <li>剩余数量：<?php echo $_smarty_tpl->getVariable('shop')->value['overnum'];?>
</li>
        <li>已有<span style="color:red"><?php echo $_smarty_tpl->getVariable('shopcount')->value;?>
</span>人参与砍价</li>
  	</ul>
  </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="ry-product-paihang">
	<h3>排行榜</h3>
	<ul>
		<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('shopjoin')->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){
?>
			<li><span class="ry-p-l"><i><img src="<?php echo $_smarty_tpl->tpl_vars['value']->value['userimg'];?>
"></i><b><?php echo $_smarty_tpl->tpl_vars['value']->value['username'];?>
</b>砍了</span><span class="ry-p-r">-¥<?php echo $_smarty_tpl->tpl_vars['value']->value['shopprice']-$_smarty_tpl->tpl_vars['value']->value['kjprice'];?>
</span></li>
		<?php }} ?>
	</ul>
</div>
<div class="clearfix"></div>
<div class="ry-product-detail">
	<h3>图文详情</h3>
	<p><?php echo $_smarty_tpl->getVariable('shop')->value['xiangqing'];?>
</p>
</div>
<div class="clearfix"></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'),$_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'=>'takePart','userid'=>$_smarty_tpl->getVariable('userid')->value,'shopid'=>$_smarty_tpl->getVariable('shopid')->value),$_smarty_tpl);?>
">我要参与</a>
	</ul>
</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 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');
	});
	
});
	
	//
	//倒计时函数
	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>
</html>
