You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1124 lines
53 KiB
1124 lines
53 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="Keywords" content="{$keywords}" />
|
|
<meta name="Description" content="{$description}" />
|
|
<!-- TemplateBeginEditable name="doctitle" -->
|
|
<title>{$page_title}</title>
|
|
<!-- TemplateEndEditable -->
|
|
<!-- TemplateBeginEditable name="head" -->
|
|
<!-- TemplateEndEditable -->
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
|
|
<link rel="stylesheet" type="text/css" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/base.css" />
|
|
<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
|
|
<link rel="alternate" type="application/rss+xml" title="RSS|{$page_title}" href="{$feed_url}" />
|
|
<link rel="stylesheet" type="text/css" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/quickLinks.css" />
|
|
<link href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/area_stock.css" rel="stylesheet" type="text/css" />
|
|
<link rel="stylesheet" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/purebox.css">
|
|
<link rel="stylesheet" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/goods_fitting.css">
|
|
{* 包含脚本文件 *}
|
|
{insert_scripts files='jquery-1.9.1.min.js,jquery.json.js,transport_jquery.js,common.js,compare.js,utils.js,cart_common.js,cart_quick_links.js,warehouse_area.js'}
|
|
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery-migrate-1.1.0.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/sc_memake.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/sc_common.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.SuperSlide.2.1.1.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.tabso_yeso.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.yomi.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/rotate3di.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/magiczoomplus.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/scroll_city.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/floor.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/notLogin.js"></script>
|
|
|
|
<style>.suspension{ display:none;}</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
{if $area_htmlType neq 'goods' && $area_htmlType neq 'exchange' && $area_htmlType neq 'presale' }
|
|
{insert_scripts files='warehouse_area.js'}
|
|
{else}
|
|
{insert_scripts files='warehouse.js'}
|
|
{/if}
|
|
|
|
<!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
|
|
<div class="ecsc-breadcrumb w1200">
|
|
<!-- #BeginLibraryItem "/library/ur_here.lbi" --><!-- #EndLibraryItem -->
|
|
</div>
|
|
<div id="p-box">
|
|
<div class="w1200">
|
|
<div class="product-intro">
|
|
<!-- #BeginLibraryItem "/library/goods_gallery.lbi" --><!-- #EndLibraryItem -->
|
|
<div class="m-item-inner">
|
|
<div class="itemInfo">
|
|
<form action="javascript:addToCart({$goods.goods_id})" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
|
|
<div class="name">
|
|
<h1>{$goods.goods_style_name}</h1>
|
|
<!--{if $goods.goods_brief}-->
|
|
<h2>{$goods.goods_brief}</h2>
|
|
<!--{/if}-->
|
|
</div>
|
|
<div class="summary clearfix">
|
|
<!--goods页面-->
|
|
<div class="summary-list">
|
|
<div class="tr border-dashed-bottom">
|
|
<div class="th m-price">
|
|
{if $goods.gmt_end_time}
|
|
{$lang.promote_price}
|
|
{else}
|
|
{$lang.shop_price}
|
|
{/if}
|
|
</div>
|
|
<!-- {if $cfg.show_marketprice} 市场价格-->
|
|
<div class="th s-price">{$lang.market_prices}</div>
|
|
<!-- {/if} -->
|
|
<div class="th p-eva">评价</div>
|
|
<div class="th p-sales">销量</div>
|
|
</div>
|
|
<div class="tr">
|
|
<div class="td m-price summary-price">
|
|
<strong id="ECS_SHOPPRICE"></strong> <a href="#none" user_id="{$user_id}" goods_id="{$goods.goods_id}" class="price_notify" style="font-size:12px;color:#005aa0;">(降价通知)</a>
|
|
</div>
|
|
<!-- {if $cfg.show_marketprice} 市场价格-->
|
|
<div class="td s-price summary-original-price">{$goods.market_price}</div>
|
|
<!-- {/if} -->
|
|
<div class="td p-eva">{$comment_all.allmen}</div>
|
|
<div class="td p-sales">{$goods.sales_volume} {$goods.measure_unit}</div>
|
|
</div>
|
|
{if $goods.gmt_end_time}
|
|
<div class="tr">
|
|
<div class="td pro-time">
|
|
<span class="label">剩余时间:</span>
|
|
<div class="time" data-time="{$goods.promote_end_time}">
|
|
<span class="days">00</span><i>天</i><span class="hours">00</span><i>时</i><span class="minutes">00</span><i>分</i><span class="seconds">00</span><i>秒</i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<!-- {if $promotion} -->
|
|
<div class="summary-promotion">
|
|
<div class="dt">促 销:</div>
|
|
<!-- {foreach from=$promotion item=item key=key name=nopromotion} -->
|
|
<!-- {if $item.type eq "favourable"} -->
|
|
<div class="dd p-promotions-wrap">
|
|
<div class="p-promotions">
|
|
<div class="prom-mj">
|
|
{if $item.act_type eq 0}
|
|
<em class="h1_red_bg">满赠</em>
|
|
{elseif $item.act_type eq 1}
|
|
<em class="h1_red_bg">立减</em>
|
|
{elseif $item.act_type eq 2}
|
|
<em class="h1_red_bg">折扣</em>
|
|
{/if}
|
|
<em class="h1_red">{$item.act_name}</em>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- {elseif $item.type eq "group_buy"} -->
|
|
<div class="dd p-promotions-wrap">
|
|
<div class="p-promotions">
|
|
<div class="prom-mj">
|
|
<a href="group_buy.php" title="{$lang.group_buy}" style="font-weight:100; color:#005aa0; text-decoration:none;">[{$lang.group_buy}]</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- {elseif $item.type eq "auction"} -->
|
|
<div class="dd p-promotions-wrap">
|
|
<div class="p-promotions">
|
|
<div class="prom-mj">
|
|
<a href="auction.php" title="{$lang.auction}" style="font-weight:100; color:#005aa0; text-decoration:none;">[{$lang.auction}]</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- {elseif $item.type eq "snatch"} -->
|
|
<a href="snatch.php" title="{$lang.snatch}" style="font-weight:100; color:#005aa0; text-decoration:none;">[{$lang.snatch}]</a>
|
|
<!-- {/if} -->
|
|
<!-- {/foreach} -->
|
|
</div>
|
|
<!-- {/if} -->
|
|
|
|
<!-- {if $goods.consumption} -->
|
|
<div class="summary-promotion">
|
|
<div class="dt"><!-- {if !($goods.consumption && $promotion)} -->促 销:<!-- {/if} --></div>
|
|
<div class="dd p-promotions-wrap">
|
|
<div class="p-promotions">
|
|
<div class="prom-mj">
|
|
<em class="h1_red_bg">满减</em>
|
|
<em class="h1_red">
|
|
<!-- {foreach from=$goods.consumption item=con name=nocon} -->
|
|
满{$con.cfull}减{$con.creduce}
|
|
<!-- {if !$smarty.foreach.nocon.last},{/if} -->
|
|
<!-- {/foreach} -->
|
|
</em>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- {/if} -->
|
|
|
|
<div class="summary-stock">
|
|
<div class="dt">配 送:</div>
|
|
<div class="dd" style="overflow:inherit">
|
|
<div class="store-selector">
|
|
<div class="text-select" id="area_address">
|
|
</div>
|
|
</div>
|
|
<div class="store-warehouse">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="summary-service">
|
|
<div class="dt">服 务:</div>
|
|
<div class="dd">
|
|
{if $goods.user_id > 0}
|
|
由 <a href="{$goods.store_url}" target="_blank">{$goods.rz_shopName}</a> 发货并提供售后服务。
|
|
{else}
|
|
由 <a href="javascript:void(0)" class="ftx-05">{$basic_info.shop_name}</a> 发货并提供售后服务。
|
|
{/if}
|
|
<!--商品运费 by wu start-->
|
|
{if $shippingFee.is_shipping neq 1}
|
|
<span style="color:#999;">[ 该地区不支持配送 ]</span>
|
|
{else}
|
|
<span style="color:#999;">[ 运费:{$shippingFee.shipping_fee_formated} ]</span>
|
|
{/if}
|
|
<!--商品运费 by wu end-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="choose p-choose-wrap">
|
|
<!-- {foreach from=$specification item=spec key=spec_key} -->
|
|
{if $spec.values}
|
|
<div class="choose-version<!-- {if $spec.attr_type eq 1} --> attr-radio<!-- {else} --> attr-check<!-- {/if} --> li">
|
|
<div class="dt">{$spec.name}:</div>
|
|
<!-- {if $cfg.goodsattr_style eq 1} -->
|
|
<div class="dd">
|
|
{if $spec.is_checked > 0}
|
|
<ul>
|
|
<!-- {foreach from=$spec.values item=value key=key name=attrvalues} -->
|
|
<li class="item{if $value.checked eq 1} selected{/if}">
|
|
<b></b>
|
|
<a rev="{$value.img_site}" name="{$value.id}" href="javascript:;" onclick="get_url(this)" >
|
|
{if $value.img_flie}
|
|
<img src="{$value.img_flie}" width="25" height="25" />
|
|
{$value.label}
|
|
{else}
|
|
{$value.label}
|
|
{/if}
|
|
<input style="display:none" id="spec_value_{$value.id}" type="radio" name="spec_{$spec_key}" value="{$value.id}" {if $value.checked eq 1}checked="checked"{/if} />
|
|
</a>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
{else}
|
|
<ul>
|
|
<!-- {foreach from=$spec.values item=value key=key name=attrvalues} -->
|
|
<li class="item{if $key eq 0} selected{/if}">
|
|
<b></b>
|
|
<a href="javascript:;" name="{$value.id}" class="noimg">
|
|
{$value.label}
|
|
<input style="display:none" id="spec_value_{$value.id}" type="radio" name="spec_{$spec_key}" value="{$value.id}" {if $key eq 0}checked="checked"{/if} /></a>
|
|
</a>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
{/if}
|
|
</div>
|
|
<input type="hidden" name="spec_list" value="{$key}" />
|
|
<!-- {else} 列表下拉-->
|
|
<!-- {if $spec.attr_type eq 1} -->
|
|
<!-- {/if} -->
|
|
<!-- {/if} -->
|
|
</div>
|
|
{/if}
|
|
<!-- {/foreach} -->
|
|
|
|
<!-- {if $goods.is_xiangou eq 1} -->
|
|
<div class="choose-num li">
|
|
<div class="dt">限 购:</div>
|
|
<div class="dd">
|
|
{$goods.xiangou_num} {$goods.measure_unit}(已购买:{$orderG_number|default:0} {$goods.measure_unit})
|
|
</div>
|
|
</div>
|
|
<!-- {/if} -->
|
|
<div class="choose-num choose-xznum li">
|
|
<div class="dt">数 量:</div>
|
|
<div class="dd">
|
|
<a class="btn-reduce" href="javascript:;">-</a>
|
|
<input class="text buy-num" id="quantity" onblur="changePrice()" value="1" name="number" defaultnumber="1">
|
|
<input type="hidden" id="perNumber" value="1000">
|
|
<input type="hidden" id="perMinNumber" value="1">
|
|
<a class="btn-add" href="javascript:;">+</a>
|
|
<span>库存:<em id="goods_attr_num"></em> {$goods.measure_unit}</span>
|
|
</div>
|
|
</div>
|
|
<div class="choose-btns">
|
|
<input name="confirm_type" id="confirm_type" type="hidden" value="3" />
|
|
|
|
{if $goods.review_status <= 2 || $goods.is_on_sale eq 0}
|
|
<a id="sold_out" class="ajax_buy" href="javascript:;"></a>
|
|
{else}
|
|
{if $goods_area eq 1}
|
|
<a href="{if $user_id <= 0 && $one_step_buy}#none{else}javascript:addToCart({$goods.goods_id}){/if}" class="buynow btn-buynow">立即购买</a>
|
|
{if !$one_step_buy}
|
|
<a href="javascript:addToCartShowDiv({$goods.goods_id})" class="btn-append"><i class="icon"></i>加入购物车</a>
|
|
{/if}
|
|
{else}
|
|
<a id="no_addToCart" class="ajax_buy" href="javascript:;"></a>
|
|
{/if}
|
|
{/if}
|
|
{if $two_code}
|
|
<div class="qrcode-wrap">
|
|
<div class="qrcode_tit">
|
|
<span class="ftx-05"> 去手机购买</span>
|
|
<span class="icon"><s></s><b></b></span>
|
|
</div>
|
|
<div id="summary-mbuy">
|
|
<i></i>
|
|
<div class="qrcode"><img src="{$weixin_img_url}" alt="商品二维码" title="{$weixin_img_text}"></div>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{if $goods.goods_extends}
|
|
<div class="choose-desc">
|
|
{if $goods.goods_extends.is_reality}<div class="choose-item choose-zp"><i class="icon"></i>正品</div>{/if}
|
|
{if $goods.goods_extends.is_return}<div class="choose-item choose-bt"><i class="icon"></i>包退</div>{/if}
|
|
{if $goods.goods_extends.is_fast}<div class="choose-item choose-ss"><i class="icon"></i>闪速</div>{/if}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!-- #BeginLibraryItem "/library/goods_merchants.lbi" --><!-- #EndLibraryItem -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="w1200">
|
|
<!-- #BeginLibraryItem "/library/goods_fittings.lbi" --><!-- #EndLibraryItem -->
|
|
<div class="ecsc-goods-layout">
|
|
<div class="ecsc-layout-210">
|
|
<!--{if $goods.user_id > 0}-->
|
|
<form method="GET" action="merchants_store.php" class="sort" name="listform">
|
|
<div id="sp-search" class="m">
|
|
<div class="mt"><h2>店内搜索</h2></div>
|
|
<div class="mc">
|
|
<p class="sp-form-item1"><input type="text" name="keyword" id="sp-keyword" value="" placeholder="关键字"></p>
|
|
<p class="sp-form-item2"><input type="text" id="sp-price" name="price_min" class="sp-price" value="" placeholder="价格"><span>~</span><input type="text" name="price_max" class="sp-price" id="sp-price1" value="" placeholder="价格"></p>
|
|
<p class="sp-form-item3"><i class="icon"></i><input type="submit" value="搜索" id="btnShopSearch"></p>
|
|
<input type="hidden" name="merchant_id" value="{$goods.user_id}" />
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{if $goods_store_cat}
|
|
<div id="sp-category" class="m">
|
|
<div class="mt"><h2>店内分类</h2></div>
|
|
<div class="mc">
|
|
<h2>查看全部商品</h2>
|
|
{foreach from=$goods_store_cat item=cat key=key}
|
|
<dl class="{if $key eq 0}open{/if}">
|
|
<dt><s class="icon"></s><span class="cate_name">{$cat.cat_name}</span></dt>
|
|
{foreach from=$cat.child_array item=cat key=key name=nocat}
|
|
<dd><a href="{$cat.url}" target="_blank">{$cat.cat_name}</a></dd>
|
|
{/foreach}
|
|
</dl>
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<!--{/if}-->
|
|
<div id="charts" class="m">
|
|
<div class="mt"><h2>最新排行榜</h2></div>
|
|
<div class="mc">
|
|
<ul class="charts-tab">
|
|
<li class="first on">新品<i></i></li>
|
|
<li>推荐<i></i></li>
|
|
<li class="last">热销<i></i></li>
|
|
</ul>
|
|
<div class="charts-list">
|
|
<!-- TemplateBeginEditable name="新品排行" -->
|
|
<!-- #BeginLibraryItem "/library/recommend_new_goods.lbi" -->
|
|
|
|
|
|
<!-- {if $new_goods} -->
|
|
<div class="charts-item">
|
|
<ul>
|
|
<!--{foreach from=$new_goods item=goods name=new}-->
|
|
<li>
|
|
<b class="sales-num sales-num-{if $smarty.foreach.new.iteration lt 4}1{else}2{/if}" id="{$smarty.foreach.new.iteration}">{$smarty.foreach.new.iteration}</b>
|
|
<div class="sales-product-img"><a href="{$goods.url}" title="{$goods.name|escape:html}"><img src="{$goods.thumb}" width="52" height="52"></a></div>
|
|
<div class="p-name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></div>
|
|
<div class="p-price">
|
|
{if $goods.promote_price neq ''}
|
|
{$goods.promote_price}
|
|
{else}
|
|
{$goods.shop_price}
|
|
{/if}
|
|
</div>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
</div>
|
|
<!-- {/if} -->
|
|
<!-- #EndLibraryItem -->
|
|
<!-- TemplateEndEditable -->
|
|
<!-- TemplateBeginEditable name="精品排行" -->
|
|
<!-- #BeginLibraryItem "/library/recommend_best_goods.lbi" -->
|
|
|
|
|
|
<!-- {if $best_goods} -->
|
|
<div class="charts-item">
|
|
<ul>
|
|
<!--{foreach from=$best_goods item=goods name=best}-->
|
|
<li>
|
|
<b class="sales-num sales-num-{if $smarty.foreach.best.iteration lt 4}1{else}2{/if}" id="{$smarty.foreach.best.iteration}">{$smarty.foreach.best.iteration}</b>
|
|
<div class="sales-product-img"><a href="{$goods.url}" title="{$goods.name|escape:html}"><img src="{$goods.thumb}" width="52" height="52"></a></div>
|
|
<div class="p-name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></div>
|
|
<div class="p-price">
|
|
{if $goods.promote_price neq ''}
|
|
{$goods.promote_price}
|
|
{else}
|
|
{$goods.shop_price}
|
|
{/if}
|
|
</div>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
</div>
|
|
<!-- {/if} -->
|
|
<!-- #EndLibraryItem -->
|
|
<!-- TemplateEndEditable -->
|
|
<!-- TemplateBeginEditable name="热销排行" -->
|
|
<!-- #BeginLibraryItem "/library/recommend_hot_goods.lbi" -->
|
|
|
|
|
|
<!-- {if $hot_goods} -->
|
|
<div class="charts-item">
|
|
<ul>
|
|
<!--{foreach from=$hot_goods item=goods name=hot}-->
|
|
<li>
|
|
<b class="sales-num sales-num-{if $smarty.foreach.hot.iteration lt 4}1{else}2{/if}" id="{$smarty.foreach.hot.iteration}">{$smarty.foreach.hot.iteration}</b>
|
|
<div class="sales-product-img"><a href="{$goods.url}" title="{$goods.name|escape:html}"><img src="{$goods.thumb}" width="52" height="52"></a></div>
|
|
<div class="p-name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></div>
|
|
<div class="p-price">
|
|
{if $goods.promote_price neq ''}
|
|
{$goods.promote_price}
|
|
{else}
|
|
{$goods.shop_price}
|
|
{/if}
|
|
</div>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
</div>
|
|
<!-- {/if} -->
|
|
<!-- #EndLibraryItem -->
|
|
<!-- TemplateEndEditable -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- TemplateBeginEditable name="左边区域(关联商品)" -->
|
|
<!-- #BeginLibraryItem "/library/goods_related.lbi" -->
|
|
|
|
|
|
<!-- {if $related_goods} -->
|
|
<div id="browse-browse-pop" class="m goods_related">
|
|
<div class="mt"><h2>{$lang.releate_goods}</h2></div>
|
|
<div class="mc">
|
|
<ul>
|
|
<!--{foreach from=$related_goods item=goods name=related}-->
|
|
<li {if $smarty.foreach.related.last} class="last"{/if}>
|
|
<div class="p-img"><a href="{$goods.url}" target="_blank"><img src="{$goods.goods_thumb}" width="172" height="172"></a></div>
|
|
<div class="p-name"><a href="{$goods.url}" title="{$goods.goods_name|escape:html}" target="_blank">{$goods.short_name}</a></div>
|
|
<div class="p-price">
|
|
<!-- {if $goods.promote_price neq ''} -->
|
|
{$goods.formated_promote_price}
|
|
<!-- {else} -->
|
|
{$goods.shop_price}
|
|
<!-- {/if} -->
|
|
</div>
|
|
<a href="javascript:addToCartShowDiv({$goods.goods_id});" class="btn">加入购物车</a>
|
|
</li>
|
|
<!-- {/foreach} -->
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- {/if} -->
|
|
<!-- #EndLibraryItem -->
|
|
<!-- TemplateEndEditable -->
|
|
<!-- TemplateBeginEditable name="左边区域(关联文章)" -->
|
|
<!-- #BeginLibraryItem "/library/goods_article.lbi" -->
|
|
|
|
<!-- {if $goods_article_list} -->
|
|
<div class="box">
|
|
<div class="box_1">
|
|
<h3><span>{$lang.article_releate}</span></h3>
|
|
<div class="boxCenterList RelaArticle">
|
|
<!-- {foreach from=$goods_article_list item=article} 相关文章 -->
|
|
<a href="{$article.url}" title="{$article.title|escape:html}">{$article.short_title|escape:html}</a><br />
|
|
<!--{/foreach}-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="blank5"></div>
|
|
<!-- {/if} -->
|
|
<!-- #EndLibraryItem -->
|
|
<!-- TemplateEndEditable -->
|
|
{insert name='history_goods' goods_id=0 warehouse_id=$region_id area_id=$area_id}
|
|
</div>
|
|
<div class="ecsc-goods-main">
|
|
<div class="ecsc-single-desc desc">
|
|
<div class="goods-detail-title goods-detail-mt">
|
|
<ul class="tabs">
|
|
<li class="tab_item first current">商品详情</li>
|
|
<li class="tab_item">商品评论</li>
|
|
<li class="tab_item">网友讨论圈</li>
|
|
</ul>
|
|
</div>
|
|
<div class="floors">
|
|
<div class="ecsc-goods-item fment">
|
|
<dl class="goods-para">
|
|
<dd class="column"><span>商品名称:{$goods.goods_name|escape:html}</span></dd>
|
|
<dd class="column"><span>商品编号:{$goods.goods_sn}</span></dd>
|
|
<dd class="column"><span>店铺:<a href="{$goods.store_url}" title="{$goods.rz_shopName}" target="_blank">{$goods.rz_shopName}</a></span></dd>
|
|
<dd class="column"><span>上架时间:{$goods.add_time}</span></dd>
|
|
</dl>
|
|
{if $properties}
|
|
<dl class="goods-para" style="margin-top:0px;">
|
|
<!-- {foreach from=$properties item=property_group key=key} -->
|
|
<dt class="hide">{$key}</dt>
|
|
<!-- {foreach from=$property_group item=property} -->
|
|
<dd class="column"><span title="{$property.value}">{$property.name|escape:html}:{$property.value}</span></dd>
|
|
<!-- {/foreach}-->
|
|
<!-- {/foreach}-->
|
|
</dl>
|
|
{/if}
|
|
<div class="goods-detail-banner">
|
|
{$goods.goods_desc}
|
|
</div>
|
|
</div>
|
|
<div class="ecsc-goods-item fment pinglun">
|
|
<div class="goods-detail-title">
|
|
<h2>商品评价({$comment_all.allmen})</h2>
|
|
<a href="user.php?act=comment_list" class="btn-comment" target="_blank">发表评论</a>
|
|
</div>
|
|
<div class="overview-detail">
|
|
<div class="rate">
|
|
<strong>{$comment_all.goodReview}<span>%</span></strong>
|
|
<span class="hp">好评率</span>
|
|
</div>
|
|
<div class="percent">
|
|
<dl>
|
|
<dt>好评<span>({$comment_all.goodReview}%)</span></dt>
|
|
<dd><div style="width: {$comment_all.goodReview}px;"></div></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>中评<span>({$comment_all.middlReview}%)</span></dt>
|
|
<dd><div style="width: {$comment_all.middlReview}px;"></div></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>差评<span>({$comment_all.badReview}%)</span></dt>
|
|
<dd><div style="width: {$comment_all.badReview}px;"></div></dd>
|
|
</dl>
|
|
</div>
|
|
<!--{if $goods.impression_list}-->
|
|
<div class="actor-new">
|
|
<dl>
|
|
<dt>买家印象:</dt>
|
|
<dd class="p-bfc">
|
|
<!--{foreach from=$goods.impression_list item=tag}-->
|
|
<p class="conmm-tags"><span>{$tag.txt}</span><em>({$tag.num})</em></p>
|
|
<!--{/foreach}-->
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<!--{/if}-->
|
|
</div>
|
|
<div class="comments-list">
|
|
{* ECSHOP 提醒您:动态载入goods_comment_title.lbi,显示首页分类小广告 *}{insert name='goods_comment_title' goods_id=$goods.goods_id}
|
|
<div class="ratelist-content">
|
|
<!-- #BeginLibraryItem "/library/comments.lbi" --> <!-- #EndLibraryItem -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ecsc-goods-item fment tiezi">
|
|
{* ECSHOP 提醒您:动态载入goods_discuss_title.lbi,显示首页分类小广告 *}{insert name='goods_discuss_title' goods_id=$goods.goods_id}
|
|
<div class="table" id="discuss_list_ECS_COMMENT">
|
|
<div class="thead">
|
|
<div class="th td1">主题</div>
|
|
<div class="th td2">回复/浏览</div>
|
|
<div class="th td3">作者</div>
|
|
<div class="th td4">时间</div>
|
|
</div>
|
|
<div class="tbody">
|
|
{foreach from=$discuss_list.list item=list}
|
|
<div class="tr">
|
|
<div class="td td1">
|
|
{if $list.dis_type eq 1}
|
|
<i class="tie_icon tao"></i>
|
|
{elseif $list.dis_type eq 2}
|
|
<i class="tie_icon wen"></i>
|
|
{elseif $list.dis_type eq 3}
|
|
<i class="tie_icon quan"></i>
|
|
{elseif $list.dis_type eq 4}
|
|
<i class="tie_icon shai"></i>
|
|
{/if}
|
|
<div class="s1">
|
|
{if $list.dis_type eq 4}
|
|
<a href="single_sun.php?act=discuss_show&did={$list.dis_id}&dis_type=4" target="_blank">{$list.dis_title}</a>
|
|
<img src="images/image_s.jpg">
|
|
{else}
|
|
<a href="single_sun.php?act=discuss_show&did={$list.dis_id}" target="_blank">{$list.dis_title}</a>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="td td2">{$list.reply_num}/{$list.dis_browse_num}</div>
|
|
<div class="td td3"><a href="user.php">{$list.user_name}</a></div>
|
|
<div class="td td4">{$list.add_time}</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
<div class="tfoot">
|
|
<div class="fr"><span>共{$all_count}个话题</span><a href="category_discuss.php?id={$goods.goods_id}" target="_blank">点击浏览全部 ></a></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ecsc-goods-love ecsc-goods-love-new">
|
|
<div class="ec-title"><h3>猜你喜欢</h3><a href="javascript:void(0)" class="ec-huan" data-changepage="1"><i class="icon"></i>换一组</a></div>
|
|
<div class="clearance-content" id="goodsLove_content">
|
|
<!-- #BeginLibraryItem "/library/guess_goods_love.lbi" --><!-- #EndLibraryItem -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- #BeginLibraryItem "/library/goods_fittings_cnt.lbi" --><!-- #EndLibraryItem -->
|
|
|
|
{* ECSHOP 提醒您:动态载入user_menu_position.lbi,显示首页分类小广告 *}{insert name='user_menu_position'}
|
|
|
|
<!-- @authro guan start 添加对比文件 start -->
|
|
<!-- #BeginLibraryItem "/library/duibi.lbi" --><!-- #EndLibraryItem -->
|
|
<!-- @authro guan start 添加对比文件 end -->
|
|
|
|
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
|
|
<!--- 降价通知弹出层start -->
|
|
<div class="thickdiv"></div>
|
|
<div id="notify_box" class="thickbox" >
|
|
<div class="thickwrap" style="width: 520px;">
|
|
<div style="width:500" id="notify_title" class="thicktitle"><span>降价通知</span></div>
|
|
<div style="width: 500px; height: 260px; padding-left: 10px; padding-right: 10px;" id="notify_con" class="thickcon">
|
|
<div id="sale-notice">
|
|
<p>一旦商品在30日内降价,您将收到邮件、短信和手机推送消息!通过手机客户端消息提醒,购买更便捷~</p>
|
|
<div class="form-item">
|
|
<label style="padding-right: 5px;" for="price-notice">价格低于¥</label><input type="text" id="price-notice" name="price-notice">
|
|
<em>时,通知我</em>
|
|
<div style="color: Red; display: inline;" id="priceError"></div>
|
|
<div style=" display: none;" id="price"></div>
|
|
</div>
|
|
<div class="form-item">
|
|
<label style="padding-right: 5px;" for="cellphone">手机号码:</label><input type="text" class="input-email" id="cellphone" name="cellphone">
|
|
<div style="color: Red; display: inline;" id="phoneError"></div>
|
|
</div>
|
|
<div class="form-item">
|
|
<label style="padding-right: 5px;" for="email">邮箱地址:</label><input type="text" class="input-email" id="user_email" name="email">
|
|
<em style="color: red;">*</em>
|
|
<div style="color: Red; display: inline;" id="MailError"></div>
|
|
</div>
|
|
<div class="form-submit">
|
|
<input type="button" value="提交" id="submit_notice" name="submit">
|
|
<span style="color: Red; display: inline;" id="notProduce"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<a id="" class="thickclose" href="#">×2</a>
|
|
</div>
|
|
</div>
|
|
<!--- 弹出层stop -->
|
|
<div class="ecsc-cart-popup" id="addtocartdialog">
|
|
<div class="loading-mask"></div>
|
|
<div class="loading">
|
|
<div class="center_pop_txt">
|
|
<div class="title"><h3>提示</h3><a href="javascript:loadingClose();" title="关闭" class="loading-x">X</a></div>
|
|
</div>
|
|
<div class="btns">
|
|
<a href="flow.php" class="ecsc-btn-mini ecsc-btn-orange">去付款</a>
|
|
<a href="javascript:loadingClose();" class="ecsc-btn-mini">继续购物</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- #BeginLibraryItem "/library/common_html.lbi" --><!-- #EndLibraryItem -->
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.purebox.js"></script>
|
|
<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} -->
|
|
$(function(){
|
|
changePrice('onload');
|
|
change_group();
|
|
Compare.init();
|
|
fixpng();
|
|
goods_delivery_area();
|
|
try { onload_leftTime(); }
|
|
catch (e) {}
|
|
});
|
|
|
|
/**
|
|
* 点选可选属性或改变数量时修改商品价格的函数
|
|
*/
|
|
function changePrice(onload)
|
|
{
|
|
var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
|
|
var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
|
|
|
|
//ecmoban模板堂 --zhuo start 限购
|
|
if(onload != 'onload'){
|
|
{if $xiangou eq 1}
|
|
{if $goods.is_xiangou==1 && $goods.xiangou_num > 0}
|
|
var xuangou_num = {$goods.xiangou_num};
|
|
var xiangou = {$xiangou};
|
|
if(qty > xuangou_num && xuangou_num > 0 && xiangou == 1){
|
|
|
|
var add_cart_divId = 'flow_add_cart';
|
|
var content = '<div id="flow_add_cart">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">超过限购数量</h3>' +
|
|
'</div>' +
|
|
'</div>' +
|
|
'</div>';
|
|
pb({
|
|
id:add_cart_divId,
|
|
title:'标题',
|
|
width:455,
|
|
height:58,
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:false
|
|
});
|
|
|
|
qty = 1;
|
|
}
|
|
{/if}
|
|
{/if}
|
|
|
|
Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty + '&warehouse_id=' + {$region_id|default:0} + '&area_id=' + {$area_id|default:0}, changePriceResponse, 'GET', 'JSON');
|
|
}else{
|
|
Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty + '&warehouse_id=' + {$region_id|default:0} + '&area_id=' + {$area_id|default:0} + '&onload=' + onload, changePriceResponse, 'GET', 'JSON');
|
|
}
|
|
//ecmoban模板堂 --zhuo end 限购
|
|
}
|
|
|
|
/**
|
|
* 接收返回的信息
|
|
*/
|
|
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;
|
|
}
|
|
|
|
$('#cost-price').html(res.marketPrice_amount);
|
|
|
|
//ecmoban模板堂 --zhuo satrt
|
|
if (document.getElementById('goods_attr_num')){
|
|
document.getElementById('goods_attr_num').innerHTML = res.attr_number;
|
|
document.getElementById('perNumber').value = res.attr_number;
|
|
}
|
|
|
|
if(document.getElementById('ECS_SHOPPRICE')){
|
|
document.getElementById('ECS_SHOPPRICE').innerHTML = res.shop_price;
|
|
|
|
var combo_shop = document.getElementsByName('combo_shopPrice[]');
|
|
var combo_mark = document.getElementsByName('combo_markPrice[]');
|
|
|
|
for(var i=0; i<combo_shop.length; i++){
|
|
combo_shop[i].innerHTML = res.shop_price;
|
|
}
|
|
|
|
for(var i=0; i<combo_mark.length; i++){
|
|
combo_mark[i].innerHTML = res.market_price;
|
|
}
|
|
}
|
|
|
|
if(res.err_no == 2){
|
|
$('#isHas_warehouse_num').html("该地区暂不支持配送");
|
|
}else{
|
|
if (document.getElementById('isHas_warehouse_num')){
|
|
var isHas;
|
|
if(res.attr_number > 0){
|
|
$('a.btn-append').attr('href','javascript:addToCartShowDiv({$goods.goods_id})').removeClass('btn_disabled');
|
|
$('a.buynow').attr('href','{if $user_id <= 0 && $one_step_buy}#none{else}javascript:addToCart({$goods.goods_id}){/if}').removeClass('btn_disabled');
|
|
$('a').remove('#quehuo');
|
|
isHas = '<strong>有货</strong>,下单后立即发货';
|
|
}else{
|
|
isHas = '<strong>无货</strong>,此商品暂时售完';
|
|
|
|
$('a.btn-append').attr('href','#none').addClass('btn_disabled');
|
|
$('a.buynow').attr('href','#none').addClass('btn_disabled');
|
|
|
|
{if $goods.review_status >= 3}
|
|
if(!document.getElementById('quehuo')){
|
|
{if $goods.is_on_sale neq 0}
|
|
$('div.choose-desc').before('<a id="quehuo" class="ajax_buy" href="javascript:addToCart({$goods.goods_id});" class="fl"></a>');
|
|
{/if}
|
|
}
|
|
{/if}
|
|
}
|
|
document.getElementById('isHas_warehouse_num').innerHTML = isHas;
|
|
}
|
|
}
|
|
|
|
if(res.fittings_interval){
|
|
for(var i=0; i<res.fittings_interval.length; i++){
|
|
$("#m_goods_" + res.fittings_interval[i].groupId).html(res.fittings_interval[i].fittings_minMax);
|
|
$("#m_goods_save_" + res.fittings_interval[i].groupId).html(res.fittings_interval[i].save_minMaxPrice);
|
|
$("#m_goods_reference_" + res.fittings_interval[i].groupId).html(res.fittings_interval[i].market_minMax);
|
|
}
|
|
}
|
|
|
|
$('.ECS_fittings_interval').html(res.shop_price);
|
|
//ecmoban模板堂 --zhuo end
|
|
}
|
|
}
|
|
|
|
function goods_delivery_area(){
|
|
var area = new Object();
|
|
|
|
area.province_id = {$area.province_id|default:0};
|
|
area.city_id = {$area.city_id|default:0};
|
|
area.district_id = {$area.district_id|default:0};
|
|
area.goods_id = {$area.goods_id|default:0};
|
|
area.user_id = {$area.user_id|default:0};
|
|
area.region_id = {$area.region_id|default:0};
|
|
area.area_id = {$area.area_id|default:0};
|
|
area.merchant_id = {$area.merchant_id|default:0};
|
|
|
|
Ajax.call('ajax_dialog.php?act=goods_delivery_area', 'area=' + $.toJSON(area), goods_delivery_areaResponse, 'POST', 'JSON');
|
|
}
|
|
|
|
function goods_delivery_areaResponse(result){
|
|
$("#area_address").html(result.content);
|
|
$(".store-warehouse").html(result.warehouse_content);
|
|
}
|
|
|
|
//处理添加商品到组合购买购物车
|
|
function get_cart_combo_open_list(rev, fitt_goods){
|
|
|
|
|
|
var group = new Object();
|
|
group.rev = rev;
|
|
|
|
if(fitt_goods){
|
|
group.fitt_goods = fitt_goods;
|
|
}
|
|
|
|
Ajax.call('flow.php?step=add_cart_combo_list', 'group=' + $.toJSON(group), get_cart_combo_openResponse, 'POST', 'JSON'); //兼容jQuery by mike
|
|
}
|
|
//处理添加商品到组合购买购物车的反馈信息
|
|
function get_cart_combo_openResponse(result)
|
|
{
|
|
if(result.list_select != 1){
|
|
$("#fittings_minMax_top").html(result.fittings_minMax);
|
|
$("#list_select").html(result.null_money);
|
|
}else{
|
|
$(".fittings_minMax").html(result.fittings_minMax);
|
|
}
|
|
|
|
$('.J_ComboDialog').find(".fitts_body").html(result.content_type);
|
|
|
|
$(".save_minMaxPrice").html(result.save_minMaxPrice);
|
|
$(".market_minMax").html(result.market_minMax);
|
|
$(".collocation_number").html(result.collocation_number);
|
|
|
|
$(".fittings_minMax").html(result.fittings_minMax);
|
|
$('strong[name="combo_savePrice[]"]').html(result.save_minMaxPrice);
|
|
$('span[name="combo_shopPrice[]"]').html(result.fittings_minMax);
|
|
$('span[name="combo_markPrice[]"]').html(result.market_minMax);
|
|
}
|
|
|
|
$(".fitting-tab").tabso({ cntSelect:".fitting-list",tabEvent:"click",tabStyle:"normal",onStyle:"on"});
|
|
$(".charts-tab").tabso({ cntSelect:".charts-list",tabEvent:"click",tabStyle:"normal",onStyle:"on"});
|
|
$(".spec-list").slide({mainCell:".spec-items ul",effect:"left",trigger:"click",pnLoop:false,autoPage:true,scroll:1,vis:5,prevCell:".spec-prev",nextCell:".spec-next"});
|
|
$(".fitting-content").slide({mainCell:".fitting-wrap ul",effect:"left",trigger:"click",pnLoop:false,autoPage:true,scroll:1,vis:5,prevCell:".fitting-prev",nextCell:".fitting-next"});
|
|
$(".p-photos-wrap").slide({mainCell:".bd ul",effect:"left",autoPlay:false,prevCell:".photo_prev",nextCell:".photo_next"});
|
|
$(".ecsc-single-desc").jfloor(43,0);
|
|
|
|
{if $goods.gmt_end_time}
|
|
$(".time").each(function(){
|
|
$(this).yomi();
|
|
});
|
|
{/if}
|
|
/**
|
|
* 猜你喜欢-换一组
|
|
*/
|
|
function change_group(){
|
|
var page = 1;
|
|
$(".ecsc-goods-love .ec-huan").click(function(){
|
|
page++;
|
|
if(page == 4){
|
|
page = 1;
|
|
}
|
|
Ajax.call('goods.php?act=guess_goods', 'page=' + page , guessGoodsResponse, 'GET', 'JSON');
|
|
});
|
|
}
|
|
function guessGoodsResponse(data){
|
|
$("#goodsLove_content").html(data.result);
|
|
}
|
|
|
|
//数量选择
|
|
function quantity(){
|
|
|
|
$(".btn-reduce").click(function(){
|
|
var quantity = Number($("#quantity").val());
|
|
var perNumber = Number($("#perNumber").val());
|
|
var perMinNumber = Number($("#perMinNumber").val());
|
|
|
|
if(quantity>perMinNumber){
|
|
quantity-=1;
|
|
$("#quantity").val(quantity);
|
|
}else{
|
|
$("#quantity").val(perMinNumber);
|
|
}
|
|
});
|
|
|
|
$(".btn-add").click(function(){
|
|
var quantity = Number($("#quantity").val());
|
|
var perNumber = Number($("#perNumber").val());
|
|
var perMinNumber = Number($("#perMinNumber").val());
|
|
var err = 0;
|
|
|
|
if(quantity < perNumber){
|
|
|
|
quantity+=1;
|
|
|
|
//限购
|
|
{if $xiangou eq 1}
|
|
{if $goods.is_xiangou==1 && $goods.xiangou_num > 0}
|
|
var xuangou_num = {$goods.xiangou_num};
|
|
var xiangou = {$xiangou};
|
|
|
|
if ({$orderG_number} >= xuangou_num){
|
|
err = 1;
|
|
var message = '已购买{$orderG_number}件商品达到限购条件,无法再购买';
|
|
quantity = 1;
|
|
}else if(quantity > xuangou_num && xuangou_num > 0 && xiangou == 1){
|
|
err = 1;
|
|
var message = '超过限购数量';
|
|
quantity = 1;
|
|
}
|
|
|
|
if(err == 1){
|
|
var add_cart_divId = 'flow_add_cart';
|
|
var content = '<div id="flow_add_cart">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">' + message + '</h3>' +
|
|
'</div>' +
|
|
'</div>' +
|
|
'</div>';
|
|
pb({
|
|
id:add_cart_divId,
|
|
title:'标题',
|
|
width:455,
|
|
height:58,
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:false
|
|
});
|
|
}
|
|
{/if}
|
|
{/if}
|
|
|
|
if(quantity == 1){
|
|
err = 0;
|
|
}
|
|
|
|
$("#quantity").val(quantity);
|
|
}else{
|
|
$("#quantity").val(perNumber);
|
|
}
|
|
})
|
|
}
|
|
quantity();
|
|
|
|
function get_url(t){
|
|
if(t.rev != ''){
|
|
location.href = t.rev;
|
|
}else{
|
|
//var spec_value = $(t).find("input:checked").val();
|
|
var spec_value = $(t).children('input').attr('value');
|
|
Ajax.call('goods.php?act=getInfo', 'id='+goods_id+'&attr_id='+spec_value,getImgUrl,'POST', 'JSON');
|
|
}
|
|
}
|
|
|
|
function getImgUrl(result)
|
|
{
|
|
if(result.t_img != ''){
|
|
$('#Zoomer').attr({ href:"" +result.t_img+ "" });
|
|
//$('#J_prodImg').attr({ href:"" +result.t_img+ "", src:"" +result.t_img+ "" });
|
|
$('#J_prodImg').attr({ src:"" +result.t_img+ "" });
|
|
$('.MagicBoxShadow').eq(0).find('img').eq(0).attr({ src:"" +result.t_img+ "" });
|
|
$('.MagicThumb-expanded').find('img').attr({ src:"" +result.t_img+ "" });
|
|
}
|
|
}
|
|
|
|
//降价通知
|
|
$(function(){
|
|
$(".price_notify").click(function(){
|
|
var user_id = $(this).attr("user_id");
|
|
if(user_id == 0){
|
|
location.href="user.php";return false;
|
|
}
|
|
$(".thickdiv").show();
|
|
$("#notify_box").show();
|
|
});
|
|
|
|
//关闭弹框
|
|
$(".thickclose").click(function(){
|
|
$(".thickdiv").hide();
|
|
$("#notify_box").hide();
|
|
})
|
|
|
|
$("#submit_notice").click(function(){
|
|
var user_id = $(".price_notify").attr("user_id");
|
|
var goods_id = $(".price_notify").attr("goods_id");
|
|
var hopeDiscount = $("#price-notice").val();
|
|
var cellphone = $("#cellphone").val();
|
|
var email = $("#user_email").val();
|
|
|
|
var res = checkform(hopeDiscount,cellphone,email);
|
|
|
|
if(!res){
|
|
return false;
|
|
}
|
|
|
|
jQuery.ajax({
|
|
url: 'goods.php?act=price_notice',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
data: {
|
|
'user_id': user_id,
|
|
'goods_id': goods_id,
|
|
'hopeDiscount': hopeDiscount,
|
|
'cellphone':cellphone,
|
|
'email': email
|
|
},
|
|
cache: false,
|
|
success: function (result) {
|
|
if (result.status == 0) {
|
|
alert(result.msg);
|
|
$(".thickdiv").hide();
|
|
$("#notify_box").hide();
|
|
}else{
|
|
alert(result.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
}
|
|
})
|
|
|
|
});
|
|
|
|
//未登录团购弹出登录框
|
|
$('.btn-buynow').click(function(){
|
|
var user_id = Number({$user_id});
|
|
var one_step_buy = Number({$one_step_buy});
|
|
if(user_id <= 0 && one_step_buy == 1)
|
|
{
|
|
var back_url = "goods.php?id=" + {$goods.goods_id};
|
|
$.notLogin("get_ajax_content.php?act=get_login_dialog",back_url);
|
|
return false;
|
|
}
|
|
});
|
|
function checkform(hopeDiscount,cellphone,email){
|
|
//期望价
|
|
if (hopeDiscount.length == 0){
|
|
document.getElementById("priceError").style.display = "inline";
|
|
document.getElementById("priceError").innerHTML = "价格不能为空!";
|
|
return false;
|
|
}
|
|
else{
|
|
var myreg = /^[+]?(([1-9]\d*[.]?)|(0.))(\d{0,2})?$/;
|
|
if (!myreg.test(hopeDiscount)) {
|
|
document.getElementById("priceError").style.display = "inline";
|
|
document.getElementById("priceError").innerHTML = "价格输入格式不正确!";
|
|
return false;
|
|
} else {
|
|
document.getElementById("priceError").innerHTML = "";
|
|
}
|
|
}
|
|
//手机号码
|
|
if (cellphone.length > 0 ) {
|
|
var rg = /^(0|86|17951)?(1[0-9])[0-9]{9}$/
|
|
if (!rg.test(cellphone)) {
|
|
document.getElementById("phoneError").style.display = "inline";
|
|
document.getElementById("phoneError").innerHTML = " 手机格式不正确!";
|
|
$("#cellphone").attr("class", "input-email input-error");
|
|
return false;
|
|
}
|
|
else {
|
|
document.getElementById("phoneError").innerHTML = "";
|
|
}
|
|
} else {
|
|
document.getElementById("phoneError").innerHTML = "";
|
|
}
|
|
//邮箱
|
|
if (email.length == 0) {
|
|
document.getElementById("MailError").style.display = "inline";
|
|
document.getElementById("MailError").innerHTML = "邮箱不能为空!";
|
|
$("#user_email").attr("class", "input-email input-error");
|
|
return false;
|
|
} else {
|
|
var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
|
|
if (!reg.test(email)) {
|
|
document.getElementById("MailError").style.display = "inline";
|
|
document.getElementById("MailError").innerHTML = "邮箱格式不正确!";
|
|
$("#user_email").attr("class", "input-email input-error");
|
|
return false;
|
|
}
|
|
else {
|
|
document.getElementById("MailError").innerHTML = "";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
});
|
|
|
|
{foreach from=$lang.compare_js item=item key=key}
|
|
{if $key neq 'button_compare'}
|
|
var {$key} = "{$item}";
|
|
{else}
|
|
var button_compare = '';
|
|
{/if}
|
|
{/foreach}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|