mall_header.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/home.css">
  2. <div class="header clearfix">
  3. <div class="w1200">
  4. <div class="logo">
  5. <a href="{$Think.HOME_SITE_URL}"><img src="{:ds_get_pic(ATTACH_COMMON,$Think.config.ds_config.site_logo)}"/></a>
  6. </div>
  7. <div class="top_search">
  8. <div class="top_search_box">
  9. <div id="search">
  10. <ul class="tab" dstype="{$Request.controller}">
  11. <li class="current"><span>{$Think.lang.site_search_goods}</span><i class="arrow"></i></li>
  12. <li style="display: none;"><span>{$Think.lang.site_search_store}</span></li>
  13. </ul>
  14. </div>
  15. <div class="form_fields">
  16. <form class="search-form" id="search-form" method="get" action="{:url('Search/index')}">
  17. <input placeholder="{$Think.lang.search_merchandise_keywords}" name="keyword" id="keyword" type="text" class="keyword" value="{$Request.param.keyword}" maxlength="60" />
  18. <input type="submit" id="button" value="{$Think.lang.ds_common_search}" class="submit">
  19. </form>
  20. </div>
  21. </div>
  22. <ul class="top_search_keywords">
  23. {foreach name="hot_search" item="hot_keyword" key="hot_k" }
  24. <li {if $hot_k==0}class="first"{/if}><a href="{$Think.HOME_SITE_URL}/Search/index.html?keyword={$hot_keyword}">{$hot_keyword}</a></li>
  25. {/foreach}
  26. </ul>
  27. </div>
  28. <div class="user_menu">
  29. <dl class="my-mall">
  30. <dt><span class="ico iconfont">&#xe702;</span>{$Think.lang.ds_user_center}<i class="arrow"></i></dt>
  31. <dd>
  32. <div class="sub-title">
  33. <h4></h4>
  34. <a href="{:url('Member/index')}" class="arrow">{$Think.lang.ds_my_user_center}<i></i></a>
  35. </div>
  36. <div class="user-centent-menu">
  37. <ul>
  38. <li><a href="{:url('Membermessage/message')}">{$Think.lang.ds_message}(<span>{if session('member_id')}{$message_num|default=0}{else}0{/if}</span>)</a></li>
  39. <li><a href="{:url('Memberorder/index')}" class="arrow">{$Think.lang.ds_my_order}<i></i></a></li>
  40. <li><a href="{:url('Memberconsult/index')}">{$Think.lang.ds_consulting_reply}(<span id="member_consult">0</span>)</a></li>
  41. <li><a href="{:url('Memberfavorites/fglist')}" class="arrow">{$Think.lang.ds_favorites}<i></i></a></li>
  42. <li><a href="{:url('Membervoucher/index')}">{$Think.lang.ds_vouchers}(<span id="member_voucher">0</span>)</a></li>
  43. <li><a href="{:url('Memberpoints/index')}" class="arrow">{$Think.lang.ds_my_points}<i></i></a></li>
  44. </ul>
  45. </div>
  46. <div class="browse-history">
  47. <div class="part-title">
  48. <h4>{$Think.lang.ds_recently_browsed_items}</h4>
  49. <span style="float:right;"><a href="{:url('Membergoodsbrowse/listinfo')}">{$Think.lang.ds_full_history}</a></span>
  50. </div>
  51. <ul>
  52. <li class="no-goods"><img class="loading" src="{$Think.HOME_SITE_ROOT}/images/loading.gif"></li>
  53. </ul>
  54. </div>
  55. </dd>
  56. </dl>
  57. <dl class="my-cart">
  58. <dt><span class="ico iconfont">&#xe69a;</span>{$Think.lang.ds_shopping_cart_settlement}<i class="arrow"></i></dt>
  59. <dd>
  60. <div class="sub-title">
  61. <h4>{$Think.lang.ds_latest_additions}</h4>
  62. </div>
  63. <div class="incart-goods-box">
  64. <div class="incart-goods"><div class="no-order"><span>{$Think.lang.ds_shopping_cart_empty}</span></div></div>
  65. </div>
  66. <div class="checkout"> <span class="total-price"></span><a href="{:url('Cart/index')}" class="btn-cart">{$Think.lang.ds_checkout_cart}</a> </div>
  67. </dd>
  68. <div class="addcart-goods-num">{$cart_goods_num}</div>
  69. </dl>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="mall_nav">
  74. <div class="w1200">
  75. <div class="all_categorys">
  76. <div class="mt">
  77. <i></i>
  78. <h3><a href="{:url('Category/goods')}">{$Think.lang.ds_all_commodity_classes}</a></h3>
  79. </div>
  80. <div class="mc">
  81. <ul class="menu">
  82. {notempty name="header_categories"}
  83. {php}$i = 0;{/php}
  84. {foreach name="header_categories" item="val" key="key" }
  85. {php}$i++;{/php}
  86. <li cat_id="{$val.gc_id}" {if $i>11}style="display:none;"{/if}>
  87. <div class="class">
  88. <span class="arrow"></span>
  89. {notempty name="$val.gc_image"}
  90. <span class="ico"><img src="{:ds_get_pic(ATTACH_COMMON, $val.gc_image)}"></span>
  91. {else/}
  92. <span class="iconfont category-ico-{$i}"></span>
  93. {/notempty}
  94. <h4><a href="{:url('Search/index',['cate_id'=>$val.gc_id])}">{$val.gc_name}</a></h4>
  95. </div>
  96. <div class="sub-class" cat_menu_id="{$val.gc_id}">
  97. <div class="sub-class-content">
  98. <div class="recommend-class">
  99. {notempty name="$val.cn_classs"}
  100. {foreach name="$val.cn_classs" item="v" key="k" }
  101. <span><a href="{:url('Search/index',['cate_id'=>$v.gc_id])}" title="{$v.gc_name}">{$v.gc_name}</a></span>
  102. {/foreach}
  103. {/notempty}
  104. </div>
  105. {notempty name="$val.class2"}
  106. {foreach name="$val.class2" item="v" key="k" }
  107. <dl>
  108. <dt>
  109. <h3><a href="{:url('Search/index',['cate_id'=>$v.gc_id])}">{$v.gc_name}</a></h3>
  110. </dt>
  111. <dd class="goods-class">
  112. {notempty name="$v.class3"}
  113. {foreach name="$v.class3" item="v3" key="k3" }
  114. <a href="{:url('Search/index',['cate_id'=>$v3.gc_id])}">{$v3.gc_name}</a>
  115. {/foreach}
  116. {/notempty}
  117. </dd>
  118. </dl>
  119. {/foreach}
  120. {/notempty}
  121. </div>
  122. <div class="sub-class-right">
  123. {notempty name="$val.cn_brands"}
  124. <div class="brands-list">
  125. <ul>
  126. {foreach name="$val.cn_brands" item="brand"}
  127. <li>
  128. <a href="{:url('Brand/brand_goods',['brand_id'=>$brand.brand_id])}" title="{$brand.brand_name}">{if ($brand['brand_pic'] != '')}<img src="{:brand_image($brand['brand_pic'])}"/>{/if}
  129. <span>{$brand.brand_name}</span>
  130. </a>
  131. </li>
  132. {/foreach}
  133. </ul>
  134. </div>
  135. {/notempty}
  136. <div class="adv-promotions">
  137. {if isset($val.goodscn_adv1) && $val.goodscn_adv1 != ''}
  138. <a {if $val.goodscn_adv1_link == ''}href="javascript:;"{else/}target="_blank" href="{$val.goodscn_adv1_link}{/if}><img src="{$val.goodscn_adv1}" data-url="{$val.goodscn_adv1}" class="scrollLoading" /></a>
  139. {/if}
  140. {if isset($val.goodscn_adv2) && $val.goodscn_adv2 != ''}
  141. <a {if $val.goodscn_adv2_link == ''}href="javascript:;"{else/}target="_blank" href="{$val.goodscn_adv2_link}{/if}><img src="{$val.goodscn_adv2}" data-url="{$val.goodscn_adv2}" class="scrollLoading" /></a>
  142. {/if}
  143. </div>
  144. </div>
  145. </div>
  146. </li>
  147. {/foreach}
  148. {/notempty}
  149. </ul>
  150. </div>
  151. </div>
  152. <div class="nav_list">
  153. <ul class="site_menu">
  154. <li><a href="{:url('Index/index')}" class="current">{$Think.lang.ds_index}</a></li>
  155. {foreach $navs.middle as $nav}
  156. <li><a href="{$nav.nav_url}" {if $nav.nav_new_open == 1}target="_blank"{/if}>{$nav.nav_title}</a></li>
  157. {/foreach}
  158. </ul>
  159. </div>
  160. </div>
  161. </div>
  162. <!--面包屑导航 BEGIN-->
  163. {notempty name="nav_link_list"}
  164. <div class="dsh-breadcrumb-layout">
  165. <div class="dsh-breadcrumb w1200"><i class="iconfont">&#xe6ff;</i>
  166. {foreach $nav_link_list as $nav_link}
  167. {empty name="nav_link.link"}
  168. <span>{$nav_link.title}</span>
  169. {else /}
  170. <span><a href="{$nav_link.link}">{$nav_link.title}</a></span><span class="arrow">></span>
  171. {/empty}
  172. {/foreach}
  173. </div>
  174. </div>
  175. {/notempty}
  176. <!--面包屑导航 END-->
  177. <script>
  178. $(function() {
  179. //首页左侧分类菜单
  180. $(".all_categorys ul.menu").find("li").each(
  181. function() {
  182. $(this).hover(
  183. function() {
  184. var cat_id = $(this).attr("cat_id");
  185. var menu = $(this).find("div[cat_menu_id='"+cat_id+"']");
  186. menu.show();
  187. $(this).addClass("hover");
  188. var menu_height = menu.height();
  189. if (menu_height < 60) menu.height(80);
  190. menu_height = menu.height();
  191. var li_top = $(this).position().top;
  192. $(menu).css("top",-li_top + 40);
  193. },
  194. function() {
  195. $(this).removeClass("hover");
  196. var cat_id = $(this).attr("cat_id");
  197. $(this).find("div[cat_menu_id='"+cat_id+"']").hide();
  198. }
  199. );
  200. }
  201. );
  202. $(".user_menu dl").hover(function() {
  203. $(this).addClass("hover");
  204. }, function() {
  205. $(this).removeClass("hover");
  206. });
  207. $('.user_menu .my-mall').mouseover(function() {
  208. // 最近浏览的商品
  209. load_history_information();
  210. $(this).unbind('mouseover');
  211. });
  212. $('.user_menu .my-cart').mouseover(function() {
  213. // 运行加载购物车
  214. load_cart_information();
  215. $(this).unbind('mouseover');
  216. });
  217. });
  218. </script>