Server : Apache
System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/saimikebio.com/mobile/themes/lingshi/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/saimikebio.com/mobile/themes/lingshi/goods.dwt
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta charset="utf-8" />
<title>{$page_title}</title>
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<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" />
<link href="{$ectouch_themes}/images/touch-icon.png" rel="apple-touch-icon-precomposed" />
<link href="{$ectouch_themes}/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="{$ectouch_css}" rel="stylesheet" type="text/css" />
<link href="{$ectouch_themes}/goods.css" rel="stylesheet" type="text/css" />



<script type="text/javascript" src="js/magiczoom_plus.js" ></script>
<script type="text/javascript" src="js/common1.js">
</script>
{insert_scripts files='jquery-1.9.1.min.js'}
<script type="text/javascript" src="js/jquery.json.js"></script>
<script type="text/javascript">
function changenum(diff) {
	var num = parseInt(document.getElementById('goods_number').value);
	var goods_number = num + Number(diff);
	if( goods_number >= 1){
		document.getElementById('goods_number').value = goods_number;//更新数量
		changePrice();
	}
}
</script>
<script language="javascript">
function shows_number(result)
{
     if(result.product_number !=undefined){
         document.getElementById('shows_number').innerHTML = result.product_number+'{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}';
     }else{
         document.getElementById('shows_number').innerHTML = '无库存';
     }
}
//默认就显示第一个属性库存
function changeKucun()
{
var frm=document.forms['ECS_FORMBUY'];
spec_arr = getSelectedAttributes(frm);
    if(spec_arr==''){
	 var shows_kucun_number = document.getElementById('shows_number');
	 if (shows_kucun_number)
	 {
	   shows_kucun_number.innerHTML = '{$goods.goods_number}{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}';
	 }
    }else{
         Ajax.call('goods.php?act=get_products_info', 'id=' + spec_arr+ '&goods_id=' + goods_id, shows_number, 'GET', 'JSON');
    }
}
</script>
</head>
<body>
<header id="header">
  <div class="header_l header_return"> <a class="ico_10" href="cat_all.php"> 返回 </a> </div>
  <h1> 商品详情 </h1>

</header>
<!--商品图 s---> 
<script src="{$ectouch_themes}/js/TouchSlide.js"></script>

<section class="goods_slider">

  <div id="slideBox" class="slideBox">
    <div class="scroller"> 
      <ul>
        <!--{if $pictures}--> 
        <!-- {foreach from=$pictures item=picture name=no}--> 
              <li><a href="javascript:showPic()"><img style="width:100%;height:auto;" src="{if $picture.http}{$picture.img_url}{else}{$site_url}{$picture.img_url}{/if}" /></a></li>
        <!--{/foreach}-->
        <!--{else}-->
	      <li><a href="javascript:showPic()"><img alt="" src="{$site_url}{$goods.goods_img}"/></a></li>
        <!--{/if}-->
      </ul>
    </div>
    <div class="icons">
      <ul>
        <i class="current"></i> 
        <!--{if $pictures}--> 
        <!-- {foreach from=$pictures item=picture name=no}--> 
        <i class="current"></i> 
        <!--{/foreach}--> 
        <!--{/if}-->
      </ul>
    </div>
  </div>
  <a class="{if $is_collect==1}collect1{else}collect{/if}" id="collect_box" href="javascript:collect({$goods.goods_id})" style="display: inline;">{$record_count}</a>
</section>
<script type="text/javascript">
TouchSlide({ 
	slideCell:"#slideBox",
	titCell:".icons ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
	mainCell:".scroller ul", 
	effect:"leftLoop", 
	autoPage:true,//自动分页
	autoPlay:true //自动播放wq
});

function showPic(){
	var data = document.getElementById("slideBox").className;
	var reCat = /ui-gallery/;
	//str1.indexOf(str2);
	if( reCat.test(data) ){
		document.getElementById("slideBox").className = 'slideBox';
	}else{
		document.getElementById("slideBox").className = 'slideBox ui-gallery';
		//document.getElementById("slideBox").style.position = 'fixed';
	}
}
</script> 
<!--商品图 end---> 
<!--商品参数-->
<section class="goodsInfo_title">
  <div class="blank1n"></div>
  <ul>
    <li>
   {if  $user_prices }
	<b class="price" >{$user_prices.price}</b>
   {else}
      <!--{if $goods.is_sale and $goods.sale_end_time } 限时秒杀-->
	<b class="price">{$goods.sale_price_formated}</b>
      <!--{elseif $goods.is_promote and $goods.gmt_end_time } 促销-->
	<b class="price">{$goods.promote_price}</b>
      <!--{else}-->
	<b class="price">{$goods.shop_price_formated}</b>
      <!--{/if}--> 
   {/if}
    <!-- {if $cfg.show_marketprice} 市场价格--><!--<del>{$goods.market_price}</del>--><!-- {/if} -->
   <!-- <p class="xiaoliang">已售出 {$sales_count} </p>-->
    </li>
  </ul>
  <div class="blank1n"></div>
  <h1> {$goods.goods_style_name} </h1>
  <div class="blank1n"></div>
    <div class="brief">
    {$goods.goods_brief} 
  </div>
  <div class="blank1n"></div>
</section>
<div class="blank2n"></div>
  
<!--{if $goods.is_sale and $goods.sale_end_time } 限时秒杀-->
<section class="goodsInfo_time">
		<script type="text/javascript" src="{$ectouch_themes}/js/jquery.countdown-2.5.3.min.js"></script>
		  <ul>
		    <li><span class="time_title">限时秒杀</span> <span class="time"><time class="countdown" id="timedown"><font id="ps_labels_{$goods.goods_id}" over="false"></font><span id="ps_cd_{$goods.goods_id}" class="timenum">{$lang.please_waiting}</span><font id="ps_labele_{$goods.goods_id}" over="false"></font></time></span> </li>
		  </ul>
		<script type="text/javascript">
				            $().ready(function(){
				            	countdown.setLabels(
				   	   				 '毫秒|秒|分|小时|天| 周| 月| 年| 十年| 世纪| 千年',
				   	   				 '毫秒|秒|分|小时|天| 周| 月| 年| 十年| 世纪| 千年',
				   	   				 '',//秒连接符
				   	   				 '',//其他时间连接符
				   	   				 'End',
				   	   				 function(n){ return n.toString()
				   	   			});
				            	<!-- {if $goods.sale_start_time > $goods.gmtime && $goods.sale_end_time > $goods.gmtime} -->
				   	           	var endDate = new Date({$goods.sale_start_time});
				   	           	var status = "0";
							$("#ps_labels_{$goods.goods_id}").html("还有");
							$("#ps_labele_{$goods.goods_id}").html("开始");
				            	<!-- {else} -->
				   	           	var endDate = new Date({$goods.sale_end_time});
				   	           	var status = "1";
							$("#ps_labels_{$goods.goods_id}").html("还剩");
							$("#ps_labele_{$goods.goods_id}").html("结束");
				            	<!-- {/if} -->
				            					   	           	//if({$goods.goods_id} == 62){
				   	           	//	endDate = new Date(2015, 6, 29, 12, 09);
				   	           	//}
				   	           	
				   	           	
				   	         	var timerId = null;
				   	           	
				   	           	function countdown_callback(ts){
							//alert(ts);
					   	           	$("#ps_cd_{$goods.goods_id}").html(ts.toString());
				   	    			//alert($("#ps_cd_{$goods.goods_id}").html());
				   	    			
				   	    			if(status == 0){
				   	    				//预热中-&gt;秒杀中
				   	    				if(ts == "End"){
			Ajax.call('index.php?act=clear_cache', 'POST', 'JSON');
					   	    				window.clearInterval(timerId);
					   	    				$("#ps_cd_{$goods.goods_id}").html("");
					   	    				//$("#ps_label_{$goods.goods_id}").html("销售中");
					   	    				$("#zhuangtai{$goods.goods_id}").removeClass("weikaishi");
					   	    				$("#zhuangtai{$goods.goods_id}").addClass("jinxinzhong");
					   	    				$("#ps_labels_{$goods.goods_id}").attr("over", true);
					   	    				$("#ps_labele_{$goods.goods_id}").attr("over", true);
							$("#ps_labels_{$goods.goods_id}").html("还剩");
							$("#ps_labele_{$goods.goods_id}").html("结束");
					   	    				status = 1;
					   	    				endDate = new Date({$goods.sale_end_time});
					   	    				timerId = countdown(countdown_callback, endDate, countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
					   	    			}
				   	    			}else{
				   	    				//秒杀中-&gt;活动已结束
				   	    				if(ts == "End" || new Date().getTime() > endDate.getTime()){
					   	    				window.clearInterval(timerId);
					   	    				$("#ps_cd_{$goods.goods_id}").html("");
					   	    				$("#ps_labels_{$goods.goods_id}").html("活动已结束");
										Ajax.call('index.php?act=clear_cache', 'POST', 'JSON');
					   	    				$("#nowbuy").html("活动已结束");
										$('#buy_btn').attr('href','javascript:void(0);');
					   	    				$("#ps_labele_{$goods.goods_id}").html("");
					   	    				$("#ps_labels_{$goods.goods_id}").attr("over", true);
					   	    				$("#ps_labele_{$goods.goods_id}").attr("over", true);
					   	    			}
				   	    			}
				   	           	}
				   	           	
				   	            timerId = countdown(countdown_callback, endDate, countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
				            });
		</script>		
</section>
<div class="blank2n"></div>
<!--{elseif $goods.is_promote and $goods.gmt_end_time } 促销-->
<section class="goodsInfo_time">
  {insert_scripts files='lefttime.js'}
  <ul>
    <li><span class="time_title">限时促销</span><span class="time"><time class="countdown" id="leftTime">{$lang.please_waiting}</time></span> </li>
  </ul>
</section>
<div class="blank2n"></div>
<!--{/if}-->

<!--{if $volume_price_list || $promotion} 商品购买优惠-->
<section class="goodsInfo_volume_price">
  <ul>
    <li class="goodsInfo_li_more"><span class="goodsInfo_li_title">商品购买优惠</span></li>
  </ul>
</section>
<section id="choose_good_volume_price" style="height:0; overflow:hidden;">
    <section class="good_volume_price">
        <h2>商品购买优惠活动</h2>
        <ul>
	<!-- {foreach from=$volume_price_list item=price_list key=price_key} -->
            <li>
	        <i>惠</i>
                <p class="p_left">购买{$price_list.number}{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}&nbsp;&nbsp;优惠价:{$price_list.format_price}&nbsp;/&nbsp;{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}</p>
	    </li>
	<!-- {/foreach} -->
	<!-- {foreach from=$promotion item=item key=key} 优惠活动-->
            <li>
                <i>惠</i>
                <p class="p_left">{$item.act_name}</p>
	    </li>
	<!-- {/foreach} -->
        </ul>
    </section>
    <div class="goods_shut"><a href="javascript:void(0)" id="close_choose_good_volume_price" class="shut">确定</a></div>
</section>
<!--{/if}-->

<section class="goodsInfo_user_service">
  <ul>
    <li class="goodsInfo_li_more"><span class="goodsInfo_li_title">会员服务</span></li>
  </ul>
</section>
<section id="choose_good_user" style="height:0; overflow:hidden;">
    <section class="good_user_service">
        <h2>会员享受服务</h2>
        <ul>
	<!-- {foreach from=$rank_prices item=rank_price key=key} 会员等级对应的价格-->
            <li>
                <p class="p_left">{$rank_price.rank_name}:{$rank_price.price}</p>
	    </li>
	<!-- {/foreach} -->
	<!-- {if $cfg.use_integral} 购买此商品可使用积分-->
            <li>
                <p class="p_left">{$lang.goods_integral}{$goods.integral}{$points_name}</p>
	    </li>
	<!-- {/if} -->
	<!-- {if $goods.give_integral > 0} 购买此商品赠送积分-->
            <li>
                <p class="p_left">{$lang.goods_give_integral}{$goods.give_integral}{$points_name}</p>
	    </li>
	<!-- {/if} -->
	<!-- {if $goods.bonus_money} 红包-->
            <li>
                <p class="p_left">{$lang.goods_bonus}{$goods.bonus_money}</p>
	    </li>
	<!-- {/if} -->
        </ul>
    </section>
    <div class="goods_shut"><a href="javascript:void(0)" id="close_choose_good_user_service" class="shut">确定</a></div>
</section>

<section class="goodsInfo_canshu">
  <ul>
    <li class="goodsInfo_li_more"><span class="goodsInfo_li_title">商品参数</span></li>
  </ul>
</section>
<section id="choose_good_canshu" style="height:0; overflow:hidden;">
    <section class="good_canshu">
        <h2>商品详细参数</h2>
        <ul>
            <li>
                <p class="p_left">商品名称:</p><p class="p_right">{$goods.goods_style_name}</p>
	    </li>
	    <!-- {if $goods.goods_sn} 显示商品货号 -->
            <li>
                <p class="p_left">商品编号:</p><p class="p_right">{$goods.goods_sn}</p>
	    </li>
	    <!--{/if}-->
	    <!-- {if $goods.goods_brand} 显示商品品牌-->
            <li>
                <p class="p_left">商品品牌:</p><p class="p_right"><a href="{$goods.goods_brand_url}" >{$goods.goods_brand}</a></p>
	    </li>
	    <!--{/if}-->
	    <!-- {if $goods.add_time} 上架时间-->
            <li>
                <p class="p_left">上架时间:</p><p class="p_right">{$goods.add_time}</p>
	    </li>
	    <!--{/if}-->
	    <!-- {if $goods.goods_weight} 商品重量-->
            <li>
                <p class="p_left">商品重量:</p><p class="p_right">{$goods.goods_weight}</p>
	    </li>
	    <!--{/if}-->
	    <!-- {if $properties} -->
	      <!-- {foreach from=$properties item=property_group key=key} -->
	        <!-- {foreach from=$property_group item=property} -->
		    <li>
			<p class="p_left">{$property.name|escape:html}:</p><p class="p_right">{$property.value}</p>
		    </li>
	        <!-- {/foreach}-->
	      <!-- {/foreach}-->
	    <!--{/if}-->
        </ul>
    </section>
    <div class="goods_shut"><a href="javascript:void(0)" id="close_choose_canshu" class="shut">确定</a></div>
</section>




<!--商品参数 begin-->
<div class="wrap">
  <section class="goodsBuy">
    {if $specification}
    <section class="goodsInfo_buyinfo" onclick="choose_attr(0)">
      <ul>
        <li class="goodsInfo_li_more"><span class="goodsInfo_li_title">请选择&nbsp;&nbsp;&nbsp;&nbsp;<!-- {foreach name=spec from=$specification item=spec key=spec_key} --><!-- {if $smarty.foreach.spec.iteration>1}--> / <!-- {/if} -->{$spec.name}<!-- {/foreach} --></span></li>
      </ul>
    </section>
    {/if}
    <form action="javascript:addToCart({$goods.goods_id})" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
	<section class="f_block" id="choose_attr" style="height:0; overflow:hidden;">
	<!-- #BeginLibraryItem "/library/goods_choose_attr.lbi" --><!-- #EndLibraryItem -->
	</section>
    </form>
  </section>
</div>

<script type="text/javascript">
//介绍 评价 咨询切换
var tab_now = 1;
function tab(id){
	document.getElementById('tabs' + tab_now).className = document.getElementById('tabs' + tab_now).className.replace('current', '');
	document.getElementById('tabs' + id).className = document.getElementById('tabs' + id).className.replace('', 'current');

	tab_now = id;
	if (id == 1) {
		document.getElementById('tab1').className = '';
		document.getElementById('tab2').className = 'hidden';
		document.getElementById('tab3').className = 'hidden';
	}else if (id == 2) {
		document.getElementById('tab1').className = 'hidden';
		document.getElementById('tab2').className = '';
		document.getElementById('tab3').className = 'hidden';
	}else if (id == 3) {
		document.getElementById('tab1').className = 'hidden';
		document.getElementById('tab2').className = 'hidden';
		document.getElementById('tab3').className = '';
	}
}
</script> 

<!--商品参数 begin-->
<section class="s-detail">
  <header>
    <ul style="position: static;" id="detail_nav">
      <li id="tabs1" onClick="tab(1)" class="current"> 详情 </li>
      <li id="tabs2" onClick="tab(2)" class=""> 评价 <span class="review-count">({$goods.comment_count})</span> </li>
      <li id="tabs3" onClick="tab(3)" class=""> 热销 </li>
    </ul>
  </header>
  <div id="tab1">
    <div class="desc wrap">
	
	
{if $goods.goods_video}
		<div class="blank2n"></div>
		<div style=" text-align:center">
		 <script type="text/javascript" src="../js/chplayer/chplayer.js"></script>
		 <div id="video" style=" height:15rem; max-width:95%; margin:0 auto"></div>
		 <script type="text/javascript">
			var videoObject = {
				container: '#video',//“#”代表容器的ID,“.”或“”代表容器的class
			variable: 'player',//该属性必需设置,值等于下面的new chplayer()的对象
			volume: 0.6, //默认音量,范围是0-1
			poster: '', //封面图片地址
			autoplay: false, //是否自动播放,默认true=自动播放,false=默认暂停状态
			loop: false, //是否循环播放,默认false=不需要,true=需要
		 live: false, //是否是直播,默认false=点播放,true=直播
			loaded: 'loadedHandler', //当播放器加载后执行的函数
		 seek: 0, //默认需要跳转的时间
			drag: 'start', //在flashplayer情况下是否需要支持按关键帧拖动,不需要留空,需要请填写拖动时请求的属性,本例中使用start,如果需要强制按时间点拖动则增加前缀time_,本例中即time_start,如果需要强制按关键帧进行拖动,则前缀是frames_,本例中即:frames_start
			front: '', //前一集按钮点击触发函数,即点击前一集时调用的函数名称,默认为空
			next: '', //下一集按钮点击触发函数,即点击下一集时调用的函数名称,默认为空
			flashplayer:false,//强制使用flashplayer
			html5m3u8:false,//是否使用hls,默认不选择,如果此属性设置成true,则不能设置flashplayer:true,
		
				video:'../../{$goods.goods_video}'//视频地址
		 };
			var player=new chplayer(videoObject);
		 </script>
		</div>
{/if}
	
      <div class="blank2n"></div>
		{$goods.goods_desc}
    </div>
  </div>
  <div id="tab2" class="hidden">
    <div class="wrap">
      <div class="blank2n"></div>
      <!-- #BeginLibraryItem "/library/comments.lbi" --> {insert_scripts files='transport.js,utils.js'}
      <div id="ECS_COMMENT"> {* ECSHOP 提醒您:动态载入comments_list.lbi,显示评论列表和评论表单 *}{insert name='comments' type=$type id=$id}</div>
      <!-- #EndLibraryItem -->
      <script language="javascript"> ShowMyComments({$goods.goods_id},0,1);</script>
    </div>
  </div>
  <div id="tab3" class="hidden">
    <div class="wrap">
      <ul class="m-recommend ">
        <div class="blank2n"></div>
		<!--{if $related_goods}-->
			<!--{foreach from=$related_goods item=releated_goods_data name="related_goods"}-->
				<!--{if $smarty.foreach.related_goods.index <4}-->
					<li class="flex_in  "   <!-- {if $smarty.foreach.related_goods.index mod 2 eq 1} --> style="float:right" <!-- {/if} --> >
						<a href="{$releated_goods_data.url}">
							<div class="summary radius5">
								<img src="{$site_url}{$releated_goods_data.goods_thumb}" alt=""/>
								<div class="info">
								  <div class="price">
									<!-- {if $releated_goods_data.promote_price neq 0} --> 
									{$releated_goods_data.formated_promote_price} 
									<!-- {else} --> 
									{$releated_goods_data.shop_price} 
									<!-- {/if} --> 
								  </div>
								  <div class="name">
									{$releated_goods_data.goods_name} 
								  </div>
								</div>
							</div>
						</a>
					</li>
				<!-- {/if} -->
			<!--{/foreach}-->
		<!-- {else} --> 
			<!--{foreach from=$hot_goods item=hot_goods name="hot_goods"}-->
				<!--{if $smarty.foreach.hot_goods.index <4}-->
					<li class="flex_in  "   <!-- {if $smarty.foreach.hot_goods.index mod 2 eq 1} --> style="float:right" <!-- {/if} --> >
						<a href="{$hot_goods.url}">
							<div class="summary radius5">
								<img src="{$site_url}{$hot_goods.thumb}" alt=""/>
								<div class="info">
								  <div class="price">
									<!-- {if $hot_goods.promote_price neq 0} --> 
									{$hot_goods.formated_promote_price} 
									<!-- {else} --> 
									{$hot_goods.shop_price} 
									<!-- {/if} --> 
								  </div>
								  <div class="name">
									{$hot_goods.name} 
								  </div>
								</div>
							</div>
						</a>
					</li>
				<!-- {/if} -->
			<!--{/foreach}-->
		<!-- {/if} -->
      </ul>
    </div>
  </div>
</section>
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem --> 
<!--购物车区域 S--> 

<!--购物车区域 E-->
<script type="text/javascript">
var goods_id = {$goods_id};
var goodsattr_style = {$cfg.goodsattr_style|default:1};
var gmt_end_time = {$promote_end_time|default:0};
{foreach from=$lang.goods_js item=item key=key}
var {$key} = "{$item}";
{/foreach}
var goodsId = {$goods_id};
var now_time = {$now_time};
<!-- {literal} -->
onload = function(){
  changePrice();
  changeKucun();//这里是添加的
  fixpng();
  try { onload_leftTime(); }
  catch (e) {}
}
/**
 * 点选可选属性或改变数量时修改商品价格的函数
 */
function changePrice()
{
  var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
  var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
  {if $goods.min_number}
    if(qty < {$goods.min_number})
    {
        alert('最少订购数量为{$goods.min_number}件');
        qty = {$goods.min_number};
	document.forms['ECS_FORMBUY'].elements['number'].value = qty;
    }
  {/if}
  Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
}

/**
 * 接收返回的信息
 */
function changePriceResponse(res)
{
  if (res.err_msg.length > 0)
  {
    alert(res.err_msg);
  }
  else
  {
    document.forms['ECS_FORMBUY'].elements['number'].value = res.qty;

    if (document.getElementById('ECS_GOODS_AMOUNT'))
      document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
  }
}
<!-- {/literal} -->
</script>



<script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
<!-- {/literal} -->
  wx.config({
    debug: false,
    appId: '{$signPackage.appId}',
    timestamp: {$signPackage.timestamp},
    nonceStr: '{$signPackage.nonceStr}',
    signature: '{$signPackage.signature}',
    jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage' 
    ]
  });
 wx.ready(function () {
	//监听“分享给朋友”
    wx.onMenuShareAppMessage({
      title: '{$goods.goods_style_name}',
      desc: '{$goods.goods_style_name}',
      link: '{$url}',
      imgUrl: '{$site_url}{$goods.goods_thumb}',
      trigger: function (res) {
		
		{if $url}
        alert('分享可以获取提成哦!');
		{else}
		alert('需要分销商登录后分享才能获得提成哦!');
		{/if}
		
      },
      success: function (res) {
		{if $dourl }
        window.location.href="{$dourl}&type=1"; 
		{/if}
      },
      cancel: function (res) {
        alert('您已取消分享');
      },
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });

	//分享到朋友圈
    wx.onMenuShareTimeline({
      title: '{$goods.goods_style_name}',
      desc: '{$goods.goods_style_name}',
      link: '{$url}',
      imgUrl: '{$site_url}{$goods.goods_thumb}',
      trigger: function (res) {
			
        {if $url}
			alert('分享可以获取提成哦!');
		{else}
			alert('需要分销商登录后分享才能获得提成哦!');
		{/if}
      },
      success: function (res) {
       	{if $dourl }
        window.location.href="{$dourl}&type=2"; 
		{/if}
      },
      cancel: function (res) {
         alert('您已取消分享');
      },
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });


});
<!-- {literal} -->
</script>
<section class="page_mask" style="display: none;"></section>
<section class="mdetail_bottom">
    <section class="collect bdbox">
        <a href="index.php"><img src="images/b2.png" width="50" height="50"></a>
    </section>
    <section class="cart bdbox">
        <a href="flow.php"><img src="images/b1.png" width="50" height="50"></a>
    </section>
    <section class="actions bdbox clearfix">
        <a id="addcartButton" onclick="choose_attr(0)" class="btn-popupSKU-addcart j-openPopupSKU" href="javascript:;">加入购物车</a>
        <a id="buyButton" onclick="choose_attr(1)" class="btn-popupSKU-buynow j-openPopupSKU" href="javascript:;">立刻购买</a>
    </section>
</section>
<script>
function choose_attr(num){
	document.body.style.overflow='hidden';
	$("#choose_attr").animate({height:'80%'},[10000]);

		var total=0,h=$(window).height(),
        top =$('.f_title_attr').height()||0,
		bottom =$('#choose_attr .f_foot').height()||0,
        con = $('.f_content_attr');
		total = 0.8*h;
		con.height(total-top-bottom+'px');
	$(".page_mask").show();
        if(num == 0){
            var actionForm = document.getElementById('ECS_FORMBUY');  
            actionForm.action = "javascript:addToCart({$goods.goods_id}),close_choose_attr()";
        }
        if(num == 1){
            var actionForm = document.getElementById('ECS_FORMBUY');  
            actionForm.action = "javascript:addToCart_quick({$goods.goods_id}),close_choose_attr()";
        }

}
function close_choose_attr(){	
document.body.style.overflow='';
	$(".page_mask").hide();	
	$('#choose_attr').animate({height:'0'},[10000]);
}
</script>

<!--{if $qrcodeurl}-->
<script type="text/javascript">
function hiddenweixin(){
	document.getElementById("weixin_gz").style.display='none';
}
</script>
<div style="position:relative;position:absolute;position:fixed;bottom:0px;display:block;" id="weixin_gz" class="weixingz-con">
  <div class="weixin_gz">
    <div class="weixingz-logo">
    </div>
    <div class="alogo">
      <p class="client-name">
        关注公众号即送购物红包哦!
      </p>
      <p class="client-logon">
      </p>
    </div>
    <div class="open_now">
      <a href="{$qrcodeurl}">
        <span class="open_btn">
          立即关注
        </span>
      </a>
    </div>
    <div class="close-btn-con close-btn">
      <span class="close-btn-icon" id="weixin_close" onclick="hiddenweixin();">
      </span>
    </div>
  </div>
</div>
<!-- {/if} -->
<script type="text/javascript">
$('.goodsInfo_volume_price').click(function(){
	$("#choose_good_volume_price").animate({height:'80%'},[10000]);
	$(".page_mask").show();
});
$('#close_choose_good_volume_price').click(function(){
	$(".page_mask").hide();
	$('#choose_good_volume_price').animate({height:'0'},[10000]);
});

$('.goodsInfo_user_service').click(function(){
	$("#choose_good_user").animate({height:'80%'},[10000]);
	$(".page_mask").show();
});
$('#close_choose_good_user_service').click(function(){
	$(".page_mask").hide();
	$('#choose_good_user').animate({height:'0'},[10000]);
});

$('.goodsInfo_canshu').click(function(){
	$("#choose_good_canshu").animate({height:'80%'},[10000]);
	$(".page_mask").show();
});
$('#close_choose_canshu').click(function(){
	$(".page_mask").hide();
	$('#choose_good_canshu').animate({height:'0'},[10000]);
});
</script>
{insert_scripts files='transportjq.js,utils.js'}
</body>
</html>