bhq@iemsoft.cn
2018-11-27 e2b48dac099e43f4b3243cdf19a7522e4b5eccbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<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>