header.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml" :class="isFiexd ? 'fiexd': ''">
  2. <!--顶部导航-->
  3. <div class="baseHeadTop">
  4. <div class="wrap clear">
  5. <div class="header_top_left">欢迎来到采美采购服务平台</div>
  6. <div class="header_top_left"></div>
  7. <ul class="header_top_ul" >
  8. <li class="headCart">
  9. <a v-if="userIdentity!=3" href="javascript:void(0)" class="addBtn icon" @click="goCartsLinkFn" onclick="_czc.push(['_trackEvent','顶部导航','购物车','点击','','Um_Event_Cart'])">购物车<em v-text="'('+headCart.cartCount+')'"></em></a>
  10. <div class="cartData">
  11. <div v-if="headCart.cartCount>0">
  12. <div class="cartMain">
  13. <div class="cartItem" v-for="cart in headCart.cartList">
  14. <a href="javascript:void(0)" @click="productDetailsFn(cart.productId)">
  15. <img :src="cart.image" >
  16. <span class="name" v-text="cart.name"></span>
  17. <span class="unit" v-text="'包装规格:'+cart.unit"></span>
  18. <span class="unit" v-text="'数量:'+cart.number"></span>
  19. <span class="price" v-text="'¥'+parseFloat(cart.price).toFixed(2)"></span>
  20. </a>
  21. <span class="delBtn" @click="DeleteCartProducts(cart.productId)"></span>
  22. </div>
  23. </div>
  24. <div class="cartBtm">
  25. <span>共计:<em v-text="headCart.productCount"></em> 件</span>
  26. <span>合计:<em v-text="parseFloat(headCart.priceTotal).toFixed(2)"></em> 元</span>
  27. <a class="btn" href="/shopping/cart.html" rel="nofollow">去购物车结算</a>
  28. </div>
  29. </div>
  30. <div v-else class="empty">
  31. <img src="/img/common/empty_cart.png" alt="空购物车">
  32. <p>购物车暂无商品</p>
  33. <p v-if="!loginStatus">请先<a href="/login.html" rel="nofollow">登录</a>添加商品到购物车</p>
  34. </div>
  35. </div>
  36. </li>
  37. <li><a :href="GLOBAL_USER_ID === 0 ? '/login.html' : '/user/member.html'">超级会员</a></li>
  38. <li v-if="loginStatus" id="mGlobalMenu" @click="hideGlobalMenu()">
  39. <a class="cTab" href="javascript:void(0);" v-if="userIdentity == 3" v-text="userData.name"></a>
  40. <a class="cTab" href="javascript:void(0);" v-else v-text="userData.name"></a>
  41. <div class="cShow" v-if="userIdentity == 4 || userIdentity == 2">
  42. <a href="/user/dashboard.html" rel="nofollow">我的采美</a>
  43. <a href="/user/setting/information.html" rel="nofollow">机构资料</a>
  44. <a href="javascript:void(0);" @click="userLogOut()">退出登录</a>
  45. </div>
  46. <div class="cShow" v-if="userIdentity == 3">
  47. <a href="/supplier/dashboard.html" rel="nofollow">我的采美</a>
  48. <a href="javascript:void(0);" @click="pageLinkSupplier()">店铺管理</a>
  49. <a href="javascript:void(0);" @click="userLogOut()">退出登录</a>
  50. </div>
  51. </li>
  52. <template v-else>
  53. <li><a href="/register.html" rel="nofollow" onclick="_czc.push(['_trackEvent','顶部导航','注册','点击','','Um_Event_Regirster'])">注册</a></li>
  54. <li><a href="/login.html" rel="nofollow">登录</a></li>
  55. </template>
  56. </ul>
  57. </div>
  58. </div>
  59. <!--搜索及购物车-->
  60. <div class="baseHeadCenter">
  61. <div class="wrap clear">
  62. <a href="javascript:void(0);" class="h5Only mClassBtn mIcon" title="分类"></a>
  63. <a href="/" class="logo">
  64. <img class="pcOnly" src="/img/base/logo.png" alt="采美 生美/医美采购服务平台"/>
  65. <img class="h5Only" src="/img/base/logo_m.png" alt="采美 生美/医美采购服务平台"/>
  66. </a>
  67. <div class="mf h5Only mUserCenter">
  68. <a :href="loginStatus?'/shopping/cart.html':'javascript:void(0);'" :class="loginStatus?'mAddCart mIcon':'mAddCart mIcon toLogin'" title="购物车" rel="nofollow"></a>
  69. <a v-if="loginStatus" @click="showGlobalMenu()" class="mUserIcon mIcon" href="javascript:void(0);" title="个人中心" rel="nofollow"></a>
  70. <a v-else class="mUserIcon mIcon toLogin" href="javascript:void(0);" title="个人中心" rel="nofollow"></a>
  71. </div>
  72. <div class="searchBox" id="topSearch">
  73. <div class="search">
  74. <div class="jqSelect">
  75. <div class="pc">
  76. <span data-select="0">产品</span>
  77. <ul><li data-id="0">产品</li></ul>
  78. </div>
  79. <select>
  80. <option value="0">产品</option>
  81. <option value="1">供应商</option>
  82. <option value="2">项目仪器</option>
  83. </select>
  84. </div>
  85. <input class="keyword" type="text" placeholder="请输入搜索关键词" maxlength="30"/>
  86. <a class="searchBtn icon mIcon" href="javascript:void(0);" onclick="_czc.push(['_trackEvent','顶部导航','搜索按钮','点击','','Um_Event_SearchButton'])"></a>
  87. </div>
  88. <!-- 热门搜索关键词 -->
  89. <div class="hotKey">
  90. <span th:each="word,wordStat: ${searchHotWord}">
  91. <i th:if="${wordStat.index}>0">/</i>
  92. <em class="word" th:text="${word}"></em>
  93. </span>
  94. </div>
  95. </div>
  96. <div class="wechat_qrcode">
  97. <div class="q_item">
  98. <div class="q_item_icon"><img src="/img/common/qr_code_caimei.png" alt="采美公众号"></div>
  99. <div class="q_item_code"><img src="/img/common/qr_code_caimei.png" alt="采美公众号"></div>
  100. <p>采美公众号</p>
  101. </div>
  102. <div class="q_item">
  103. <div class="q_item_icon"><img src="/img/common/qr_code_mini.jpg" alt="采美小程序"></div>
  104. <div class="q_item_code"><img src="/img/common/qr_code_mini.jpg" alt="采美小程序"></div>
  105. <p>采美小程序</p>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <!--商品分类及主导航菜单-->
  111. <div class="baseTopNav">
  112. <div class="wrap clear">
  113. <div class="baseTopNav_nav">
  114. <a class="classBtn nav on" href="javascript:void(0);">商品分类</a>
  115. <a class="home nav" href="/">首页</a>
  116. <div class="navBox">
  117. <ul class="clear">
  118. <!--导航菜单-->
  119. <li th:each="menu: ${topMenuList}">
  120. <a class="nav" th:href="${menu.link}" th:text="${menu.name}" th:attr="rel=${#strings.contains(menu.link,'caimei365.com')} ? '' : 'nofollow'" target="_blank"></a>
  121. </li>
  122. </ul>
  123. </div>
  124. </div>
  125. <div id="mainClassify" class="classifyBox mFixed">
  126. <div v-if="!isPC" class="clsHead clear">
  127. <a href="javascript:void(0);" class="mClassBtn mIcon" title="分类"></a>
  128. <a href="/" class="logo">
  129. <img src="/img/base/logo_m.png" alt="采美 生美/医美采购服务平台"/>
  130. </a>
  131. <a href="javascript:void(0);" class="close" title="关闭"></a>
  132. </div>
  133. <div class="clsTab">
  134. <div class="clsTab-main">
  135. <a href="javascript:void(0);" @click="changeClassify(1)" class="on">产品<p :class="1==classifyIndex?'line':''"></p></a>
  136. <a href="javascript:void(0);" @click="changeClassify(2)">仪器<p :class="2==classifyIndex?'line':''"></p></a>
  137. </div>
  138. </div>
  139. <div class="clsCon">
  140. <th:block th:each="type:${#numbers.sequence(1,2)}">
  141. <div class="tabItem" style="display:none;" th:id="'mainClassify_'+${type}">
  142. <div class="tabItem_lift">
  143. <th:block th:each="big,stat : ${classifyJson}" th:if="${big.get('typeSort')}*1==${type}" th:object="${big}">
  144. <a th:class="${stat.index}==0? 'on':''" href="javascript:void(0);">
  145. <img class="tabItem_lift_icon" v-if="isPC" th:src="*{wwwIcon}" th:alt="*{name}"><th:block th:text="*{name}"></th:block>
  146. </a>
  147. </th:block>
  148. </div>
  149. <div class="tabItem_right">
  150. <th:block th:each="big,stat : ${classifyJson}" th:if="${big.get('typeSort')}*1==${type}" th:object="${big}">
  151. <div class="tabItem_right_content" th:class="${stat.index}==0? 'on':''">
  152. <th:block th:if="${big.containsKey('smallTypeList')} and ${big.get('smallTypeList')!=null}">
  153. <div class="line" th:each="small : *{smallTypeList}" th:object="${small}">
  154. <div class="lft show">
  155. <a th:href="'/product/classify-'+${big.getString('typeSort')}+'-' + *{bigTypeId} +'-'+*{smallTypeId} + '.html'" target="_blank">
  156. <span v-if="isPC"> > </span>
  157. <p th:text="*{name}"></p>
  158. </a>
  159. </div>
  160. <div class="rgt mfw" >
  161. <th:block th:if="${small.containsKey('tinyTypeList')} and ${small.get('smallTypeList')!=null}">
  162. <th:block th:each="tiny : *{tinyTypeList}" th:object="${tiny}">
  163. <a th:href="'/product/classify-'+ ${big.getString('typeSort')} +'-'+ ${big.getString('bigTypeId')} +'-'+ *{smallTypeId} +'-'+ *{tinyTypeId} + '.html'" target="_blank">
  164. <img v-if="!isPC" th:src="*{crmIcon}" alt="*{name}">
  165. <p th:text="*{name}"></p>
  166. </a>
  167. </th:block>
  168. </th:block>
  169. <th:block th:unless="${small.containsKey('tinyTypeList')} and ${small.get('smallTypeList')!=null}">
  170. <a th:href="'/product/classify-'+ ${big.getString('typeSort')} +'-'+ *{bigTypeId} +'-'+ *{smallTypeId} + '.html'" target="_blank">
  171. <img v-if="!isPC" th:src="*{crmIcon}" alt=""><p>全部</p>
  172. </a>
  173. </th:block>
  174. </div>
  175. </div>
  176. </th:block>
  177. <div class="line" th:unless="${big.containsKey('smallTypeList')} and ${big.get('smallTypeList')!=null}">
  178. <div class="lft none">
  179. <a th:href="'/product/classify-'+ ${big.getString('typeSort')} +'-'+ *{bigTypeId} +'.html'" target="_blank">
  180. <span v-if="isPC"> > </span>
  181. <p th:text="*{name}"></p>
  182. </a>
  183. </div>
  184. <div class="rgt mfw" >
  185. <a th:href="'/product/classify-'+ ${big.getString('typeSort')} +'-'+ *{bigTypeId} +'.html'" target="_blank">
  186. <img v-if="!isPC" th:src="*{crmIcon}" alt=""><p>全部</p>
  187. </a>
  188. </div>
  189. </div>
  190. </div>
  191. </th:block>
  192. </div>
  193. </div>
  194. </th:block>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. <input type="hidden" th:value="${spiServer}" id="spiServer">
  200. <input type="hidden" th:value="${coreServer}" id="coreServer">
  201. <input type="hidden" th:value="${agent}" id="userAgent">
  202. </header>