<script type="text/javascript">
|
/*第一种形式 第二种形式 更换显示样式*/
|
function setGoodsTab(name,cursel,n){
|
$('html,body').animate({'scrollTop':0},600);
|
for(i=1;i<=n;i++){
|
var menu=document.getElementById(name+i);
|
var con=document.getElementById("user_"+name+"_"+i);
|
menu.className=i==cursel?"on":"";
|
con.style.display=i==cursel?"block":"none";
|
}
|
}
|
</script>
|
<div class="sc_nav">
|
<ul>
|
<li class="tab_head {if $action eq 'collection_list'}on{/if}" id="goods_ka1" ><a href="user.php?act=collection_list" class="sc1">收藏的宝贝</a></li>
|
<li class="tab_head {if $action eq 'follow_shop'}on{/if}" id="goods_ka2"><a href="user.php?act=follow_shop" class="sc2">收藏的店铺</a></li>
|
</ul>
|
</div>
|
<!---------------------------------收藏的宝贝----------------------------------->
|
<div class="main" id="user_goods_ka_1" {if $action neq 'collection_list'}style="display:none;"{/if}>
|
{if $goods_list}
|
<form name="theForm" method="post" action="">
|
<div class="shouchang">
|
{foreach from=$goods_list item=goods name=goods_list}
|
<dl>
|
<dt><a href="{$goods.url}" ><img src="{$goods.goods_thumb}" width="100" height="100"></a></dt>
|
<dd>
|
<a href="{$goods.url}">
|
<p>{$goods.goods_name}</p>
|
<strong>{if $goods.promote_price}{$goods.promote_price}{else}{$goods.shop_price}{/if}</strong>
|
</a>
|
<span>
|
<a href="javascript:addToCart({$goods.goods_id})" class="s_flow" style=" color:#E71F19;font-size:14px;">加入购物车</a>
|
<a href="javascript:deleteCollection({$goods.rec_id})" class="s_out" style=" color:#999;font-size:14px;" >删除</a>
|
</span>
|
</dd>
|
</dl>
|
{/foreach}
|
</div>
|
</form>
|
{else}
|
<div class="dotm_no">
|
<dl>
|
<dd>{$lang.collection_empty}</dd>
|
</dl>
|
</div>
|
{/if}
|
{if $goods_list}{include file='library/pages.lbi'}{/if}
|
</div>
|
<!---------------------------------收藏的店铺----------------------------------->
|
<div class="main" id="user_goods_ka_2" {if $action neq 'follow_shop'}style="display:none"{/if}>
|
{if $shop_list}
|
<form name="theForm" method="post" action="">
|
<div class="dianpu">
|
{foreach from=$shop_list item=shop name=shop_list}
|
<dl>
|
<dt>
|
<span> <a href="{$shop.url}">{$shop.shop_name}</a></span>
|
<em><a href="javascript:deleteFollow({$shop.id})">删除收藏</a></em>
|
</dt>
|
<dd>
|
<i><a href="{$shop.url}" ><img src="./../{$shop.shop_logo}" width="100" height="100"></a></i>
|
<em><a href="{$shop.url}" >进店逛逛</a></em>
|
</dd>
|
</dl>
|
{/foreach}
|
</div>
|
</form>
|
{else}
|
<div class="dotm_no">
|
<dl>
|
<dd>您还没有收藏店铺哦!</dd>
|
</dl>
|
</div>
|
{/if}
|
{if $shop_list}{include file='library/pages.lbi'}{/if}
|
</div>
|
|
|
<script language="JavaScript">
|
var elements = document.forms['theForm'].elements;
|
var url = '{$url}';
|
var u = '{$user_id}';
|
/**
|
* 生成代码
|
*/
|
function genCode()
|
{
|
// 检查输入
|
if (isNaN(parseInt(elements['goods_num'].value)))
|
{
|
alert('{$lang.goods_num_must_be_int}');
|
return;
|
}
|
if (elements['goods_num'].value < 1)
|
{
|
alert('{$lang.goods_num_must_over_0}');
|
return;
|
}
|
|
// 生成代码
|
var code = '\<script src=\"' + url + 'goods_script.php?';
|
code += 'need_image=' + elements['need_image'].value + '&';
|
code += 'goods_num=' + elements['goods_num'].value + '&';
|
code += 'arrange=' + elements['arrange'].value + '&';
|
code += 'charset=' + elements['charset'].value + '&u=' + u;
|
code += '\"\>\</script\>';
|
elements['code'].value = code;
|
elements['code'].select();
|
if (Browser.isIE)
|
{
|
window.clipboardData.setData("Text",code);
|
}
|
}
|
var compare_no_goods = "{$lang.compare_no_goods}";
|
var btn_buy = "{$lang.btn_buy}";
|
var is_cancel = "{$lang.is_cancel}";
|
var select_spe = "{$lang.select_spe}";
|
</script>
|