Authored by wangqing

头部部分函数

1 -<?php return function ($in, $debugopt = 1) {  
2 - $cx = array(  
3 - 'flags' => array(  
4 - 'jstrue' => false,  
5 - 'jsobj' => false,  
6 - 'spvar' => true,  
7 - 'prop' => false,  
8 - 'method' => false,  
9 - 'mustlok' => true,  
10 - 'echo' => false,  
11 - 'debug' => $debugopt,  
12 - ),  
13 - 'constants' => array(),  
14 - 'helpers' => array(),  
15 - 'blockhelpers' => array(),  
16 - 'hbhelpers' => array(),  
17 - 'partials' => array(),  
18 - 'scopes' => array(),  
19 - 'sp_vars' => array('root' => $in),  
20 - 'lcrun' => 'Plugin\LCRun3',  
21 -  
22 - );  
23 -  
24 - return ''.'<!DOCTYPE html>  
25 -<html>  
26 - <head>  
27 - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />  
28 - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
29 - <meta http-equiv="Cache-Control" content="no-siteapp" />  
30 - <meta name="renderer" content="webkit">  
31 - <link rel="shortcut icon" href="http://www.yohobuy.com/favicon.ico" type="image/x-icon" />  
32 - <meta name="keywords" content="'.Plugin\LCRun3::debug('[keywords]', 'encq', $cx, Plugin\LCRun3::debug('[keywords]', 'v', $cx, $in, array('keywords'))).'">  
33 - <meta name="description" content="'.Plugin\LCRun3::debug('[description]', 'encq', $cx, Plugin\LCRun3::debug('[description]', 'v', $cx, $in, array('description'))).'">  
34 - <title>'.Plugin\LCRun3::debug('[title]', 'encq', $cx, Plugin\LCRun3::debug('[title]', 'v', $cx, $in, array('title'))).'</title>  
35 - <!-- [if (gte IE 6)&(lte IE 8)>  
36 - <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>  
37 - <![endif]-->  
38 - <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css">  
39 - </head>  
40 - <body>  
41 - '.'<div class="header-page yoho-page">  
42 - <div class="header-topwrapper clearfix">  
43 - <div class="header-top">  
44 - <div class="leftpart float-left">  
45 - <span class="icon-hamburger"></span>  
46 - <a href="" class="header-yoho" >YOHO!有货</a>  
47 - <ul class="yohoproducts-list">  
48 - <li class="yohoproducts-item">  
49 - <a href="" class="yohogroup" en="YOHO!" cn="集团官网">YOHO!</a>  
50 - </li>  
51 - <li class="yohoproducts-item">  
52 - <a href="" class="yohogroup" en="YOHO!BOYS" cn="男生潮流">YOHO!BOYS</a>  
53 - </li>  
54 - <li class="yohoproducts-item">  
55 - <a href="" class="yohogroup" en="YOHO!GIRLS" cn="女生潮流">YOHO!GIRLS</a>  
56 - </li>  
57 - <li class="yohoproducts-item">  
58 - <a href="" class="yohogroup" en="YOHO!SHOW" cn="物趣分享">YOHO!SHOW</a>  
59 - </li>  
60 - <li class="yohoproducts-item">  
61 - <a href="" class="yohogroup" en="YO\'HOOD" cn="潮流嘉年华">YO\'HOOD</a>  
62 - </li>  
63 - </ul>  
64 - </div>  
65 - <div class="rightpart">  
66 - <div id="loginBox" class="float-left">  
67 - <span class="hi">Hi~</span>  
68 - <a href="" class="loginbar">[请登录]</a>  
69 - <a href="" class="registbar">[免费注册]</a>  
70 - </div>  
71 - <div class="tag-list-wrapper">  
72 - <ul class="tag-list">  
73 - <li class="tag-item myyoho" id="myYohoBox">  
74 - <span class="tag-seprate"></span>  
75 - <a href="">MY有货</a>  
76 - <span class="icon-bottomarrow"></span>  
77 - <div class="myyoho-info"></div>  
78 - </li>  
79 - <li class="tag-item myorder">  
80 - <span class="tag-seprate"></span>  
81 - <span class="icon-papers"></span>  
82 - <a href="">我的订单</a>  
83 - </li>  
84 - <li class="tag-item mycollect">  
85 - <span class="tag-seprate"></span>  
86 - <span class="icon-heart"></span>  
87 - <a href="">我的收藏</a>  
88 - </li>  
89 - <li class="tag-item message">  
90 - <span class="tag-seprate"></span>  
91 - <span class="icon-mail"></span>  
92 - <a href="">消息</a>  
93 - </li>  
94 - <li class="tag-item phone">  
95 - <span class="tag-seprate"></span>  
96 - <span class="icon-iphone"></span>  
97 - <a href="">手机版</a>  
98 - <div class="qr">  
99 - <div class="qr-img"></div>  
100 - <h3 class="qr-words">扫描二维码</h3>  
101 - <h3 class="qr-words">下载有货手机客户端</h3>  
102 - <h3 class="qr-more">更多客户端下载</h3>  
103 - </div>  
104 - </li>  
105 - </ul>  
106 - </div>  
107 - </div>  
108 - </div>  
109 - </div>  
110 - <div class="header-navwrapper clearfix">  
111 - <div class="header-navcontent">  
112 - <ul class="first-nav-list float-left">  
113 -'.Plugin\LCRun3::debug('[navbars]', 'sec', $cx, Plugin\LCRun3::debug('[navbars]', 'v', $cx, $in, array('navbars')), $in, false, function($cx, $in) {return ' <li class="first-nav-item '.Plugin\LCRun3::debug('[classname]', 'encq', $cx, Plugin\LCRun3::debug('[classname]', 'v', $cx, $in, array('classname'))).'">  
114 - <h3 class="name-cn">  
115 - <a href="'.Plugin\LCRun3::debug('[link]', 'encq', $cx, Plugin\LCRun3::debug('[link]', 'v', $cx, $in, array('link'))).'">'.Plugin\LCRun3::debug('[name_cn]', 'encq', $cx, Plugin\LCRun3::debug('[name_cn]', 'v', $cx, $in, array('name_cn'))).'</a>  
116 - </h3>  
117 - <h3 class="name-en">  
118 - <a href="'.Plugin\LCRun3::debug('[link]', 'encq', $cx, Plugin\LCRun3::debug('[link]', 'v', $cx, $in, array('link'))).'">'.Plugin\LCRun3::debug('[name_en]', 'encq', $cx, Plugin\LCRun3::debug('[name_en]', 'v', $cx, $in, array('name_en'))).'</a>  
119 - </h3>  
120 - <div class=\'sub-nav-wrapper\'>  
121 - <ul class="sub-nav-list">  
122 -'.Plugin\LCRun3::debug('[subnav]', 'sec', $cx, Plugin\LCRun3::debug('[subnav]', 'v', $cx, $in, array('subnav')), $in, false, function($cx, $in) {return ' <li class="sub-nav-item">  
123 - <a href="'.Plugin\LCRun3::debug('[link]', 'encq', $cx, Plugin\LCRun3::debug('[link]', 'v', $cx, $in, array('link'))).'">'.Plugin\LCRun3::debug('[name]', 'encq', $cx, Plugin\LCRun3::debug('[name]', 'v', $cx, $in, array('name'))).'</a>  
124 - <div class="third-nav-wrapper">  
125 - <div class="third-nav">  
126 - <div class="categorywrapper" id="category'.Plugin\LCRun3::debug('../[index_main]', 'encq', $cx, Plugin\LCRun3::debug('../[index_main]', 'v', $cx, $cx['scopes'][count($cx['scopes'])-1], array('index_main'))).''.Plugin\LCRun3::debug('[index_sub]', 'encq', $cx, Plugin\LCRun3::debug('[index_sub]', 'v', $cx, $in, array('index_sub'))).'">  
127 - <div class="category">  
128 -'.Plugin\LCRun3::debug('[thirdnav]', 'sec', $cx, Plugin\LCRun3::debug('[thirdnav]', 'v', $cx, $in, array('thirdnav')), $in, false, function($cx, $in) {return ' <div class="thirdnavlist">  
129 - <h1 class="category-title thirdnavbar">'.Plugin\LCRun3::debug('[title]', 'encq', $cx, Plugin\LCRun3::debug('[title]', 'v', $cx, $in, array('title'))).'</h1>  
130 - <ul class="category-list">  
131 -'.Plugin\LCRun3::debug('[branditems]', 'sec', $cx, Plugin\LCRun3::debug('[branditems]', 'v', $cx, $in, array('branditems')), $in, false, function($cx, $in) {return ' <li class="category-item thirdnavbar">  
132 - <a href="" hot='.Plugin\LCRun3::debug('[hot]', 'encq', $cx, Plugin\LCRun3::debug('[hot]', 'v', $cx, $in, array('hot'))).'>'.Plugin\LCRun3::debug('[brandname]', 'encq', $cx, Plugin\LCRun3::debug('[brandname]', 'v', $cx, $in, array('brandname'))).'</a>  
133 - </li>  
134 -';}).' </ul>  
135 - </div>  
136 -';}).' </div>  
137 - </div>  
138 - <div class="showdetail" data-code="220eec926e0d2c48b2f7e36fb9c42b83"><a href="http://list.yohobuy.com/?gender=1,3&amp;msort=8"><img src="http://img12.static.yhbimg.com/yhb-img01/2015/10/30/06/02af834d146e3f00b1f5fcc8388f641922.jpg?imageView/1/w/337/h/250" alt="" style=""></a><a class="title" href="http://list.yohobuy.com/?gender=1,3&amp;msort=8">热门小物优选</a></div>  
139 - </div>  
140 - </div>  
141 - </li>  
142 -';}).' </ul>  
143 - </div>  
144 - </li>  
145 -';}).' </ul>  
146 - <div class="icon-logo"></div>  
147 - <div class="header-tool float-right">  
148 - <div class="search float-left '.Plugin\LCRun3::debug('[searchcate]', 'encq', $cx, Plugin\LCRun3::debug('[searchcate]', 'v', $cx, $in, array('searchcate'))).'" >  
149 - <form action="http://search.yohobuy.com" method="get" id="searchForm">  
150 - <span class="searchspan">  
151 - <input class="searchinput" type="text" name="keyword" id="query_key" autocomplete="off" x-webkit-speech="" lang="zh-CN" x-webkit-grammar="builtin:translate" value="" onfocus="if(this.value==this.defaultValue){this.value=\'\';this.style.color=\'#333\'}" onblur="if(this.value==\'\'){this.value=this.defaultValue;this.style.color=\'#999\'}" maxlength="30"></span>  
152 - <a class="icon-search" href="javascript:submitSearch();"></a>  
153 - <ul class="search-list"></ul>  
154 - </form>  
155 - </div>  
156 - <div class="gobuy float-left '.Plugin\LCRun3::debug('[gobytype]', 'encq', $cx, Plugin\LCRun3::debug('[gobytype]', 'v', $cx, $in, array('gobytype'))).'" id="miniCartBox">  
157 -'.Plugin\LCRun3::debug('[gobuy]', 'sec', $cx, Plugin\LCRun3::debug('[gobuy]', 'v', $cx, $in, array('gobuy')), $in, false, function($cx, $in) {return ' <span class="ic-infomation">'.Plugin\LCRun3::debug('[gobuynum]', 'encq', $cx, Plugin\LCRun3::debug('[gobuynum]', 'v', $cx, $in, array('gobuynum'))).'</span>  
158 - <div class="gobuy-wrapper"></div>  
159 -';}).' </div>  
160 - </div>  
161 - </div>  
162 - </div>  
163 -</div>  
164 -<div id="goodcartempwarpper">  
165 - <script type="text/html" id="mini-cart-tpl">  
166 -<div class="gobuy-notempty">  
167 - <div class="goods-list-wrapper">  
168 - <ul class="goods-list">  
169 - %L~it.cartData.main_goods :v:index%R  
170 - <li class="goods-item">  
171 - <a href="%L=v.product_url%R">  
172 - <img src="%L=v.default_img%R" alt="" class="goods-img" />  
173 - </a>  
174 - <div class="goods-detail float-left">  
175 - <h3 class="content"><a href="%L=v.product_url%R">%L=v.product_name%R</a></h3>  
176 - <h3 class="style">  
177 - 颜色:  
178 - <span class="color">%L=v.color_name%R</span>  
179 - 尺码:  
180 - <span class="size">%L=v.size_name%R</span>  
181 - </h3>  
182 - </div>  
183 - <div class="goods-price float-left">  
184 - <h3 class="priceandnum">  
185 - <span class="price">%L=v.show_price%R</span>  
186 - x  
187 - <span class="num">%L=v.buy_number%R</span>  
188 - </h3>  
189 - <a href="javascript:void(0)" class="delete" onclick="delCartGoods(%L=v.goods_incart_id%R,%L=v.is_cheapest_free%R);">删除</a>  
190 - </div>  
191 - </li>  
192 - %L~%R  
193 - %L~it.cartData.advance_goods :v:index%R  
194 - <li class="goods-item">  
195 - <a href="%L=v.product_url%R">  
196 - <img src="%L=v.default_img%R" alt="" class="goods-img"></a>  
197 - <div class="goods-detail float-left">  
198 - <h3 class="content"><a href="%L=v.product_url%R">%L=v.product_name%R</a></h3>  
199 - <h3 class="style">  
200 - 颜色:  
201 - <span class="color">%L=v.color_name%R</span>  
202 - 尺码:  
203 - <span class="size">%L=v.size_name%R</span>  
204 - </h3>  
205 - </div>  
206 - <div class="goods-price float-left">  
207 - <h3 class="priceandnum">  
208 -  
209 - <span class="price">%L=v.show_price%R</span>  
210 - x  
211 - <span class="num">%L=v.buy_number%R</span>  
212 - </h3>  
213 - <a href="javascript:void(0)" class="delete" onclick="delCartGoods(%L=v.goods_incart_id%R,%L=v.is_cheapest_free%R);">删除</a>  
214 - </div>  
215 - </li>  
216 - %L~%R  
217 - %L~it.cartData.outlet_goods :v:index%R  
218 - <li class="goods-item">  
219 - <a href="%L=v.product_url%R">  
220 - <img src="%L=v.default_img%R" alt="" class="goods-img"></a>  
221 - <div class="goods-detail float-left">  
222 - <h3 class="content"><a href="%L=v.product_url%R">%L=v.product_name%R</a></h3>  
223 - <h3 class="style">  
224 - 颜色:  
225 - <span class="color">%L=v.color_name%R</span>  
226 - 尺码:  
227 - <span class="size">%L=v.size_name%R</span>  
228 - </h3>  
229 - </div>  
230 - <div class="goods-price float-left">  
231 - <h3 class="priceandnum">  
232 -  
233 - <span class="price">%L=v.show_price%R</span>  
234 - x  
235 - <span class="num">%L=v.buy_number%R</span>  
236 - </h3>  
237 - <a href="javascript:void(0)" class="delete" onclick="delCartGoods(%L=v.goods_incart_id%R,%L=v.is_cheapest_free%R);">删除</a>  
238 - </div>  
239 - </li>  
240 - %L~%R  
241 - %L~it.cartData.gift_goods :v:index%R  
242 - <li class="goods-item">  
243 - <a href="%L=v.product_url%R">  
244 - <img src="%L=v.default_img%R" alt="" class="goods-img"></a>  
245 - <div class="goods-detail float-left">  
246 - <h3 class="content"><a href="%L=v.product_url%R">%L=v.product_name%R</a></h3>  
247 - <h3 class="style">  
248 - 颜色:  
249 - <span class="color">%L=v.color_name%R</span>  
250 - 尺码:  
251 - <span class="size">%L=v.size_name%R</span>  
252 - </h3>  
253 - </div>  
254 - <div class="goods-price float-left">  
255 - <h3 class="priceandnum">  
256 -  
257 - <span class="price">%L=v.show_price%R</span>  
258 - x  
259 - <span class="num">%L=v.buy_number%R</span>  
260 - </h3>  
261 - <a href="javascript:void(0)" class="delete" onclick="delCartGoods(%L=v.goods_incart_id%R,%L=v.is_cheapest_free%R);">删除</a>  
262 - </div>  
263 - </li>  
264 - %L~%R  
265 - %L~it.cartData.need_pay_gifts :v:index%R  
266 - <li class="goods-item">  
267 - <a href="%L=v.product_url%R">  
268 - <img src="%L=v.default_img%R" alt="" class="goods-img"></a>  
269 - <div class="goods-detail float-left">  
270 - <h3 class="content"><a href="%L=v.product_url%R">%L=v.product_name%R</a></h3>  
271 - <h3 class="style">  
272 - 颜色:  
273 - <span class="color">%L=v.color_name%R</span>  
274 - 尺码:  
275 - <span class="size">%L=v.size_name%R</span>  
276 - </h3>  
277 - </div>  
278 - <div class="goods-price float-left">  
279 - <h3 class="priceandnum">  
280 -  
281 - <span class="price">%L=v.show_price%R</span>  
282 - x  
283 - <span class="num">%L=v.buy_number%R</span>  
284 - </h3>  
285 - <a href="javascript:void(0)" class="delete" onclick="delCartGoods(%L=v.goods_incart_id%R,%L=v.is_cheapest_free%R);">删除</a>  
286 - </div>  
287 - </li>  
288 - %L~%R  
289 - </ul>  
290 -  
291 - <ul class="activity-list">  
292 - %L? it.cartData.has_promotion == 1%R  
293 - <li class="activity-item">  
294 - <span class="activity-name">活动</span>  
295 - <h3 class="activity-content">  
296 - %L? it.cartData.fit_outlet_promotion %R购outlet商品,满¥1999再享9折%L?%R  
297 - %L? it.cartData.has_other_promotion == 1 %R<span class="mycart_i_down" title="更多" onclick="dispDom(this, \'mycartmore\');"></span>%L?%R  
298 - %L? it.cartData.has_first_promotion == 1 %R%L=it.cartData.first_promotions.promotion_title%R%L?%R  
299 - </h3>  
300 - </li>  
301 - %L?%R  
302 - %L? it.cartData.fit_free_shipping == 1%R  
303 - <li class="activity-item">  
304 - <span class="activity-name">免运费</span>  
305 - <h3 class="activity-content">全场满 ¥499免运费</h3>  
306 - </li>  
307 - %L?%R  
308 - </ul>  
309 - </div>  
310 -  
311 - <div class="gobuy-notempty-footer">  
312 - <h3>  
313 - <a href="<?php print QConfigs_Site_Config::$site_url;?>/shopping/cart">去购物车结算</a>  
314 - </h3>  
315 - </div>  
316 -</div>  
317 -</script>  
318 - <script type="text/html" id="tmpl-my-login-new">  
319 -<div class="myyoho-info-header clearfix">  
320 - %L? it.head_ico %R  
321 - <div class="myyoho-photo" style="display:none;"><img src="" alt="" data-url ="%L=it.head_ico%R"></div>  
322 - %L?%R  
323 - <h3 class="user-email"><a href="<?php print QConfigs_Site_Config::$site_url?>/home?t=%L=it.random%R">%L=it.profile_name%R</a></h3>  
324 - <h3 class="user-level">  
325 - VIP:  
326 - <span class="leveldetail">%L=it.vip.curVipInfo.title%R</span>  
327 - </h3>  
328 - %L? it.vip.curVipInfo.curLevel < 3%R  
329 - <div class="levelinfo">  
330 - <div class="levelwrapper float-left">  
331 - <div class="levelspan">  
332 - <span class="has">%L=it.vip.curYearCost%R</span>  
333 - /  
334 - <span class="total">%L=it.vip.nextVipInfo.needCost%R</span>  
335 - </div>  
336 - <p class="%L? it.vip.curYearCostPer !=0%Rintegrate%L?%R" style="width: %L=it.vip.curYearCostPer%R%;"></p>  
337 - </div>  
338 - <span class="cardcate float-left">%L=it.vip.nextVipInfo.title%R</span>  
339 - </div>  
340 - %L?%R  
341 -</div>  
342 -<ul class="myyoho-info-content">  
343 - <li class="item">  
344 - <span class="itemdetail float-left">  
345 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/orders?t=<?php print microtime(true);?>">待处理的订单</a>  
346 - </span>  
347 - <span class="itemnum float-right">%L=it.orderCount%R</span>  
348 - </li>  
349 - <li class="item">  
350 - <span class="itemdetail float-left">  
351 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/favorite?t=<?php print microtime(true);?>">我的收藏</a>  
352 - </span>  
353 - <span class="itemnum float-right"></span>  
354 - </li>  
355 - <li class="item">  
356 - <span class="itemdetail float-left">  
357 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/coupons?t=<?php print microtime(true);?>">我的优惠券</a>  
358 - </span>  
359 - <span class="itemnum float-right">%L=it.couponCount%R</span>  
360 - </li>  
361 - <li class="item">  
362 - <span class="itemdetail float-left">  
363 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/currency?t=<?php print microtime(true);?>">我的YOHO币</a>  
364 - </span>  
365 - <span class="itemnum float-right">%L=it.YohocoinCount%R</span>  
366 - </li>  
367 - <li class="item">  
368 - <span class="itemdetail float-left">  
369 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/returns?t=<?php print microtime(true);?>">我的退货换货</a>  
370 - </span>  
371 - <span class="itemnum float-right">%L=it.refundCount%R</span>  
372 - </li>  
373 -</ul>  
374 -<div class="myyoho-info-footer">  
375 - <a href="<?php print QConfigs_Site_Config::$site_url?>/home/user?t=<?php print microtime(true);?>">完善资料</a>  
376 -</div>  
377 -</script>  
378 - <script type="text/html" id="tmpl-nologin">  
379 -<span>Hi~</span>[<a href="<?php print QConfigs_Site_Config::$site_url;?>/signin.html" class="list-a login-out">请登录</a>]&nbsp;[<a href="<?php print QConfigs_Site_Config::$site_url;?>/reg.html" class="list-a login-out" onclick="getSource(\'会员部_注册统计\',\'免费注册\',\'homepage_man\');">免费注册</a>]  
380 -</script>  
381 - <script type="text/html" id="tmpl-login">  
382 -<span>Hi~<a href="<?php print QConfigs_Site_Config::$site_url;?>/home?t=<?php print microtime(true);?>">%L=it.user_name%R</a></span>&nbsp;%L? it.is_login == 1%R[<a href="%L=it.logout%R" class="list-a login-out">退出</a>]%L??%R[<a href="<?php print QConfigs_Site_Config::$site_url;?>/signin.html" class="list-a login-out">请登录</a>]&nbsp;[<a href="<?php print QConfigs_Site_Config::$site_url;?>/reg.html" onclick="getSource(\'会员部_注册统计\',\'免费注册\',\'homepage_man\');" class="list-a login-out">免费注册</a>]%L?%R  
383 -</script>  
384 - <script type="text/html" id="tmpl-my-noLogin">  
385 -<div class="account-login">  
386 - <div><a href="<?php print QConfigs_Site_Config::$site_url?>/signin.html" class="button">立即登录</a></div>  
387 - <div><span>新用户?</span><a href="<?php print QConfigs_Site_Config::$site_url?>/reg.html" onclick="getSource(\'会员部_注册统计\',\'免费注册\',\'homepage_man\');">[免费注册]</a></div>  
388 -</div>  
389 -<ul class="home-layer">  
390 - <li class="clear"><a href="<?php print QConfigs_Site_Config::$site_url?>/home/orders?t=<?php print microtime(true);?>" class="left">我的订单</a></li>  
391 - <li class="clear"><a href="<?php print QConfigs_Site_Config::$site_url?>/home/favorite?t=<?php print microtime(true);?>" class="left">我的收藏</a></li>  
392 - <li class="clear"><a href="<?php print QConfigs_Site_Config::$site_url?>/home/coupons?t=<?php print microtime(true);?>" class="left">我的优惠券</a></li>  
393 - <li class="clear"><a href="<?php print QConfigs_Site_Config::$site_url?>/home/currency?t=<?php print microtime(true);?>" class="left">我的YOHO币</a></li>  
394 - <li class="clear"><a href="<?php print QConfigs_Site_Config::$site_url?>/home/returns?t=<?php print microtime(true);?>" class="left">我的退换货</a></li>  
395 -</ul>  
396 -</script>  
397 - <script type="text/html" id="tmpl-message">  
398 -<ul>%L~ it :v:index%R<li><a href="<?php print QConfigs_Site_Config::$site_url;?>/home/message/content?id=%L=v.id%R">%L=v.title%R</a></li>%L~%R</ul>  
399 -</script>  
400 -</div>'.''.'<div class="home-page yoho-page">  
401 - I am boys page  
402 -</div>  
403 -'.''.' <div class="footer-page yoho-page">  
404 - <div class="footertop">  
405 - <div class="index-foot">  
406 - <dl class="clearfix screen">  
407 - <dd>  
408 - <div class="foot-panel">  
409 - <div class="title relative">  
410 - <div class="title-line"></div>  
411 - <div class="text">  
412 - <span>有货SERVICES</span>  
413 - </div>  
414 - </div>  
415 - <div id="foot-services">  
416 - <ul class="clearfix two-dim">  
417 - <li class="left">  
418 - <div class="">  
419 - <a href="javascript:void(0);">  
420 - <img class="dim-img lazy" data-original="http://img11.static.yhbimg.com/adpic/2014/03/20/16/01863b297051f11c2be833785566cf11d1.png" src="http://img11.static.yhbimg.com/adpic/2014/03/20/16/01863b297051f11c2be833785566cf11d1.png" style=""></a>  
421 - <p>YOHO!有货</p>  
422 - </div>  
423 - </li>  
424 - <li class="left">  
425 - <div class="">  
426 - <a href="javascript:void(0);">  
427 - <img class="dim-img lazy" data-original="http://img12.static.yhbimg.com/adpic/2014/04/11/14/022ddc2b6d6b2fcabee8cdc03735e5687e.jpg" src="http://img12.static.yhbimg.com/adpic/2014/04/11/14/022ddc2b6d6b2fcabee8cdc03735e5687e.jpg" style=""></a>  
428 - <p>微信</p>  
429 - </div>  
430 - </li>  
431 - <li class="left">  
432 - <div class="">  
433 - <a href="javascript:void(0);">  
434 - <img class="dim-img lazy" data-original="http://img13.static.yhbimg.com/adpic/2014/03/20/16/02e69d0afa222cf173d17411fd04be380e.png" src="http://img13.static.yhbimg.com/adpic/2014/03/20/16/02e69d0afa222cf173d17411fd04be380e.png" style="display: inline;"></a>  
435 - <p>微博</p>  
436 - </div>  
437 - </li>  
438 - </ul>  
439 - </div>  
440 - </div>  
441 - <p class="item-nav center" id="button-services">  
442 - <a href="javascript:void(0);" key="0">  
443 - <span class="ifont10 cur">O</span>  
444 - </a>  
445 - </p>  
446 - </dd>  
447 - <dd>  
448 - <div class="foot-panel" id="feedbackBoxList">  
449 - <div class="title relative">  
450 - <div class="title-line"></div>  
451 - <div class="text">  
452 - <span>意见反馈</span>  
453 - </div>  
454 - </div>  
455 - <ul class="clearfix vote">  
456 - <li style="display:block" key="0">  
457 - <form action="#" id="feedbackForm">  
458 - <input type="hidden" name="question_id" id="question_id" value="38">  
459 - <input type="hidden" name="feedback_id" id="feedback_id" value="5">  
460 - <div>您喜欢有货的新版吗?</div>  
461 - <div class="vote-item clearfix">  
462 - <p>  
463 - <input type="radio" name="solution" value="33">非常喜欢</p>  
464 - <p>  
465 - <input type="radio" name="solution" value="34">喜欢</p>  
466 - <p>  
467 - <input type="radio" name="solution" value="35">一般般</p>  
468 - <p>  
469 - <input type="radio" name="solution" value="36">不喜欢</p>  
470 - <p>  
471 - <input type="radio" name="solution" value="37">非常不喜欢</p>  
472 - </div>  
473 - <div>  
474 - <a href="javascript:void(0);" id="feedbackBtn" class="button">提交</a>  
475 - </div>  
476 - </form>  
477 - </li>  
478 - <li style="display:none" key="1">  
479 - <form action="#" id="feedbackForm">  
480 - <input type="hidden" name="question_id" id="question_id" value="39">  
481 - <input type="hidden" name="feedback_id" id="feedback_id" value="5">  
482 - <div>您可以方便的找到想查看的内容吗?</div>  
483 - <div class="vote-item clearfix">  
484 - <p>  
485 - <input type="radio" name="solution" value="38">非常方便</p>  
486 - <p>  
487 - <input type="radio" name="solution" value="39">方便</p>  
488 - <p>  
489 - <input type="radio" name="solution" value="40">一般般</p>  
490 - <p>  
491 - <input type="radio" name="solution" value="41">不方便</p>  
492 - <p>  
493 - <input type="radio" name="solution" value="42">非常不方便</p>  
494 - </div>  
495 - <div>  
496 - <a href="javascript:void(0);" id="feedbackBtn" class="button">提交</a>  
497 - </div>  
498 - </form>  
499 - </li>  
500 - <li style="display:none" key="2">  
501 - <form action="#" id="feedbackForm">  
502 - <input type="hidden" name="question_id" id="question_id" value="37">  
503 - <input type="hidden" name="feedback_id" id="feedback_id" value="5">  
504 - <div>您对新版还有哪些意见或建议?</div>  
505 - <textarea name="answer" id="feedback_answer"></textarea>  
506 - <div>  
507 - <a href="javascript:void(0);" id="feedbackBtn" class="button">提交</a>  
508 - </div>  
509 - </form>  
510 - </li>  
511 - </ul>  
512 - </div>  
513 - <p class="item-nav center" id="feedbackPage">  
514 - <a href="javascript:void(0);">  
515 - <span class="ifont10 cur">O</span>  
516 - </a>  
517 - <a href="javascript:void(0);">  
518 - <span class="ifont10 ">o</span>  
519 - </a>  
520 - <a href="javascript:void(0);">  
521 - <span class="ifont10 ">o</span>  
522 - </a>  
523 - </p>  
524 - </dd>  
525 - <dd class="last">  
526 - <div class="foot-panel">  
527 - <div class="title relative">  
528 - <div class="title-line"></div>  
529 - <div class="text">  
530 - <span>更多 YOHO!产品</span>  
531 - </div>  
532 - </div>  
533 - <div id="foot-mobile">  
534 - <ul class="clearfix mobile">  
535 - <li>  
536 - <a href="http://app.yohoshow.com/" target="_blank" titl="">  
537 - <img alt="" data-original="http://img13.static.yhbimg.com/adpic/2014/07/21/15/02d5e1cbc15ab59856f4a758fa860462ed.jpg" class="lazy" src="http://img13.static.yhbimg.com/adpic/2014/07/21/15/02d5e1cbc15ab59856f4a758fa860462ed.jpg" style=""></a>  
538 - </li>  
539 - <li>  
540 - <a href="http://www.yohoboys.com/" target="_blank" titl="">  
541 - <img alt="" data-original="http://img13.static.yhbimg.com/adpic/2014/07/21/15/0210a3490eae2aad6ef8bf3b8133a49ca9.jpg" class="lazy" src="http://img13.static.yhbimg.com/adpic/2014/07/21/15/0210a3490eae2aad6ef8bf3b8133a49ca9.jpg" style=""></a>  
542 - </li>  
543 - <li>  
544 - <a href="http://www.yohogirls.com/" target="_blank" titl="">  
545 - <img alt="" data-original="http://img11.static.yhbimg.com/adpic/2014/07/21/15/018be2a193424658b5201240ef8c7729e6.jpg" class="lazy" src="http://img11.static.yhbimg.com/adpic/2014/07/21/15/018be2a193424658b5201240ef8c7729e6.jpg" style=""></a>  
546 - </li>  
547 - </ul>  
548 - </div>  
549 - </div>  
550 - <p class="item-nav center" id="button-mobile">  
551 - <a href="javascript:void(0);">  
552 - <span class="ifont10 cur">O</span>  
553 - </a>  
554 - </p>  
555 - </dd>  
556 - </dl>  
557 - </div>  
558 - </div>  
559 - <div class="footerbottom">  
560 - <div class="promise">  
561 - <div class="screen clearfix">  
562 - <div class="left">  
563 - <span class="ifont rgbf">g</span>  
564 - <span class="red">100%</span>  
565 - <span class="rgbf">品牌授权正品</span>  
566 - </div>  
567 - <div class="left">  
568 - <span class="ifont rgbf">L</span>  
569 - <span class="red">7天</span>  
570 - <span class="rgbf">无理由退换货</span>  
571 - </div>  
572 - <div class="left">  
573 - <span class="ifont rgbf">p</span>  
574 - <span class="rgbf">客服电话:</span>  
575 - <span class="red">400-889-9646</span>  
576 - &nbsp;&nbsp;  
577 - <span class="rgb9">08:00-22:30(周一至周日)</span>  
578 - &nbsp;&nbsp;  
579 - <span>  
580 - <a href="http://chat80.live800.com/live800/chatClient/chatbox.jsp?companyID=493979&amp;configID=123576&amp;jid=9277320930" target="_blank" style="color:red">在线客服</a>  
581 - </span>  
582 - </div>  
583 - <div class="right subscribe footer-right">  
584 - <input class="rgb6 top" name="subscriberBox" id="subscriberBox" value="订阅我们的邮件">  
585 - <a href="javascript:void(0);" id="subscriberBtn" class="ifont rgbf">m</a>  
586 - <!--<input class="rgb6 top wrong" value="订阅我们的邮件" />  
587 - <a href="" class="ifont rgbf done">=</a>  
588 - -->  
589 - </div>  
590 - </div>  
591 - </div>  
592 - <div class="footer-help">  
593 - <div class="screen clearfix">  
594 - <div class="left">  
595 - <ul class="clearfix">  
596 - <li class="left">  
597 - <p>  
598 - <span>新手指南</span>  
599 - </p>  
600 - <p>  
601 - <a href="http://www.yohobuy.com/help/?category_id=81#help_b00reg" target="_blank">注册登录</a>  
602 - </p>  
603 - <p>  
604 - <a href="http://www.yohobuy.com/help/?category_id=83" target="_blank">选购商品</a>  
605 - </p>  
606 - <p>  
607 - <a href="http://www.yohobuy.com/help/?category_id=103" target="_blank">订单支付</a>  
608 - </p>  
609 - <p>  
610 - <a href="http://www.yohobuy.com/help/?category_id=85" target="_blank">收货退款</a>  
611 - </p>  
612 - </li>  
613 - <li class="left">  
614 - <p>  
615 - <span>会员中心</span>  
616 - </p>  
617 - <p>  
618 - <a href="http://www.yohobuy.com/help/?category_id=87" target="_blank">YOHO币</a>  
619 - </p>  
620 - <p>  
621 - <a href="http://www.yohobuy.com/help/?category_id=91" target="_blank">会员制度</a>  
622 - </p>  
623 - <p>  
624 - <a href="http://www.yohobuy.com/help/?category_id=89" target="_blank">账户管理</a>  
625 - </p>  
626 - <p>  
627 - <a href="http://www.yohobuy.com/help/?category_id=93" target="_blank">密码管理</a>  
628 - </p>  
629 - </li>  
630 - <li class="left">  
631 - <p>  
632 - <span>购物指南</span>  
633 - </p>  
634 - <p>  
635 - <a href="http://www.yohobuy.com/help/?category_id=95" target="_blank">全球购专区</a>  
636 - </p>  
637 - <p>  
638 - <a href="http://www.yohobuy.com/help/?category_id=97" target="_blank">尺码选择</a>  
639 - </p>  
640 - <p>  
641 - <a href="http://www.yohobuy.com/help/?category_id=99" target="_blank">发票</a>  
642 - </p>  
643 - <p>  
644 - <a href="http://www.yohobuy.com/help/?category_id=101" target="_blank">商品咨询</a>  
645 - </p>  
646 - </li>  
647 - <li class="left">  
648 - <p>  
649 - <span>支付方式</span>  
650 - </p>  
651 - <p>  
652 - <a href="http://www.yohobuy.com/help/?category_id=105" target="_blank">在线支付</a>  
653 - </p>  
654 - <p>  
655 - <a href="http://www.yohobuy.com/help/?category_id=107" target="_blank">货到付款</a>  
656 - </p>  
657 - <p>  
658 - <a href="http://www.yohobuy.com/help/?category_id=109" target="_blank">优惠券</a>  
659 - </p>  
660 - <p>  
661 - <a href="http://www.yohobuy.com/help/?category_id=111" target="_blank">YOHO币支付</a>  
662 - </p>  
663 - </li>  
664 - <li class="left">  
665 - <p>  
666 - <span>配送方式</span>  
667 - </p>  
668 - <p>  
669 - <a href="http://www.yohobuy.com/help/?category_id=113" target="_blank">配送时间</a>  
670 - </p>  
671 - <p>  
672 - <a href="http://www.yohobuy.com/help/?category_id=115" target="_blank">配送范围</a>  
673 - </p>  
674 - <p>  
675 - <a href="http://www.yohobuy.com/help/?category_id=119" target="_blank">顺丰速运</a>  
676 - </p>  
677 - <p>  
678 - <a href="http://www.yohobuy.com/help/?category_id=117" target="_blank">商品验收与签收</a>  
679 - </p>  
680 - </li>  
681 - <li class="left">  
682 - <p>  
683 - <span>售后服务</span>  
684 - </p>  
685 - <p>  
686 - <a href="http://www.yohobuy.com/help/?category_id=121" target="_blank">退换货政策</a>  
687 - </p>  
688 - <p>  
689 - <a href="http://www.yohobuy.com/help/?category_id=123" target="_blank">退换货流程</a>  
690 - </p>  
691 - <p>  
692 - <a href="http://www.yohobuy.com/help/?category_id=125" target="_blank">退款方式与时效</a>  
693 - </p>  
694 - <p>  
695 - <a href="http://www.yohobuy.com/help/?category_id=127" target="_blank">投诉与建议</a>  
696 - </p>  
697 - </li>  
698 - <li class="left">  
699 - <p>  
700 - <span>APP常见问题</span>  
701 - </p>  
702 - <p>  
703 - <a href="http://www.yohobuy.com/help/?category_id=133" target="_blank">IPhone版</a>  
704 - </p>  
705 - <p>  
706 - <a href="http://www.yohobuy.com/help/?category_id=135" target="_blank">Android版</a>  
707 - </p>  
708 - <p>  
709 - <a href="http://www.yohobuy.com/help/?category_id=137" target="_blank">wap版</a>  
710 - </p>  
711 - <p>  
712 - <a href="http://www.yohobuy.com/help/?category_id=139" target="_blank">IPAD版</a>  
713 - </p>  
714 - </li>  
715 - </ul>  
716 - </div>  
717 - </div>  
718 - </div>  
719 - <div class="footer-link">  
720 - <div class="screen clearfix">  
721 - <div class="left right-flag">  
722 - <a href="https://ss.knet.cn/verifyseal.dll?sn=e14021832010046477dka7000000&amp;ct=df&amp;a=1&amp;pa=0.5902942178957805" target="_blank" rel="nofollow">  
723 - <img src="http://static.yohobuy.com/images/v3/icon/credit-flag3.png"></a>  
724 - <a href="http://www.isc.org.cn/" target="_blank" rel="nofollow">  
725 - <img src="http://static.yohobuy.com/images/v3/icon/isc2.png"></a>  
726 - </div>  
727 - <div class="left about-us">  
728 - <p>  
729 - <a href="http://www.yohobuy.com">返回首页</a>  
730 - <span>|</span>  
731 - <a href="http://www.yohobuy.com">YOHO!有货</a>  
732 - <span>|</span>  
733 - <a href="http://www.yohobuy.com/newpower.html">新力传媒</a>  
734 - <span>|</span>  
735 - <a href="http://www.yohobuy.com/contact.html">联系我们</a>  
736 - <span>|</span>  
737 - <a href="http://shop.yohobuy.com/settled">商家入驻</a>  
738 - <span>|</span>  
739 - <a href="http://www.yohobuy.com/privacy.html">隐私条款</a>  
740 - <span>|</span>  
741 - <a href="http://www.yohobuy.com/link.html">友情链接</a>  
742 - </p>  
743 - <p>  
744 - CopyRight © 2007-2016 南京新与力文化传播有限公司  
745 - <a href="http://www.miibeian.gov.cn/" target="_blank" style="color:#666">苏ICP备09011225号</a>  
746 - NewPower Co. 版权所有 经营许可证编号:苏B2-20120395  
747 - </p>  
748 - </div>  
749 -  
750 - </div>  
751 - </div>  
752 - </div>  
753 - </div>'.' <script src="http://localhost:8000/static/js/sea.js?nowrap"></script>  
754 - <script>  
755 - seajs.config({  
756 - base: \'http://localhost:8000/\'  
757 - });  
758 - </script>  
759 -'.' <script>  
760 - seajs.use(\'js/common\');  
761 - seajs.use(\'js/header\');  
762 - </script>  
763 -  
764 -'.Plugin\LCRun3::debug('if [boysHomePage]', 'ifv', $cx, Plugin\LCRun3::debug('[boysHomePage]', 'v', $cx, $in, array('boysHomePage')), $in, function($cx, $in) {return ' <script>  
765 - seajs.use(\'js/home/entrey\', function(h) {  
766 - h.set(\'boys\');  
767 - });  
768 - </script>  
769 -';}).'  
770 -'.Plugin\LCRun3::debug('if [searchListPage]', 'ifv', $cx, Plugin\LCRun3::debug('[searchListPage]', 'v', $cx, $in, array('searchListPage')), $in, function($cx, $in) {return ' <script>  
771 - seajs.use(\'js/product/list\');  
772 - </script>  
773 - ';}).''.' </body>  
774 -</html>'.'';  
775 -}  
776 -?>  
@@ -912,7 +912,11 @@ @@ -912,7 +912,11 @@
912 </script> 912 </script>
913 '.' <script> 913 '.' <script>
914 seajs.use(\'js/common\'); 914 seajs.use(\'js/common\');
915 - seajs.use(\'js/header\'); 915 + seajs.use(\'js/header\',function(header) {
  916 + if(header) {
  917 + header.init();
  918 + }
  919 + });
916 </script> 920 </script>
917 921
918 '.Plugin\LCRun3::debug('if [boysHomePage]', 'ifv', $cx, Plugin\LCRun3::debug('[boysHomePage]', 'v', $cx, $in, array('boysHomePage')), $in, function($cx, $in) {return ' <script> 922 '.Plugin\LCRun3::debug('if [boysHomePage]', 'ifv', $cx, Plugin\LCRun3::debug('[boysHomePage]', 'v', $cx, $in, array('boysHomePage')), $in, function($cx, $in) {return ' <script>
1 <script> 1 <script>
2 seajs.use('js/common'); 2 seajs.use('js/common');
3 - seajs.use('js/header'); 3 + seajs.use('js/header',function(header) {
  4 + if(header) {
  5 + header.init();
  6 + }
  7 + });
4 </script> 8 </script>
5 9
6 {{!-- 首页 --}} 10 {{!-- 首页 --}}
@@ -5,14 +5,441 @@ @@ -5,14 +5,441 @@
5 */ 5 */
6 6
7 var $ = require('jquery'); 7 var $ = require('jquery');
  8 +
  9 +/**
  10 + * 获取顶部banner的回调函数
  11 + * @param {[type]} data [description]
  12 + */
  13 +window.JsonPCallBack = function(data) {
  14 + if (+data.code === 200) {
  15 + if (typeof data.data === 'object') {
  16 + var topbanner = '<a target="_blank" href="' + data.data.url + '" class="page-top-banner" style="height:50px;border:none;background-image:url(' + window.unescape(data.data.src) + ');background-position: center;display:block;background-color:#ff5409;">&nbsp;</a>';
  17 + $('body').prepend(topbanner);
  18 + }
  19 + }
  20 +}
  21 +
  22 +var noticeSuccess = false;
  23 +
  24 +/**
  25 + * 获取公告的回调函数
  26 + */
  27 +window.NoticeCallBack = function(data) {
  28 + if (+data.code === 200) {
  29 + noticeSuccess = true;
  30 + }
  31 +}
  32 +/**
  33 + * 检测是否获得公告
  34 + * @return {[type]} [description]
  35 + */
  36 +function checkNotice() {
  37 + if (!noticeSuccess) {
  38 + var noticeinner = '<div class="noticewrapper">' +
  39 + '<div class="noticecontainer">' +
  40 + '<h1 class="noticetitle">关于系统升级的公告</h1>' +
  41 + '<div class="noticecontent">' +
  42 + '<p class="tips">尊敬的顾客:</p>' +
  43 + '<p class="detail">您好!为了向您提供更优质的服务,目前系统正在升级,请耐心等待。</p>' +
  44 + '<p class="detail">' +
  45 + '系统升级期间,部分地区用户体验会有暂时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。稍后系统将恢复正常' +
  46 + '</p>' +
  47 + '<p class="detail">使用,欢迎您继续光顾YOHO!BUY有货!带来不便之处深表歉意,请您谅解!</p>' +
  48 + '</div>' +
  49 + '</div>' +
  50 + '</div>';
  51 + $('.header-topwrapper').append(noticeinner);
  52 + }
  53 +}
  54 +/**
  55 + * 获得banner数据
  56 + * @param {[string]} code [banner对应的编码]
  57 + * @return {[type]} [description]
  58 + */
  59 +function getBannerData(code) {
  60 + var script = document.createElement("script");
  61 + script.src = 'http://new.yohobuy.com/resource/getbanner?content_code=' + code + '&client_type=web&callback=JsonPCallBack';
  62 + document.getElementsByTagName("head")[0].appendChild(script);
  63 +}
  64 +/**
  65 + * 获取公告的jsonp请求
  66 + * @param {[type]} code [description]
  67 + * @return {[type]} [description]
  68 + */
  69 +function getNoticeData(code) {
  70 + var script = document.createElement("script");
  71 + script.src = 'http://new.yohobuy.com/resource/getbanner?content_code=' + code + '&client_type=web&callback=NoticeCallBack';
  72 + document.getElementsByTagName("head")[0].appendChild(script);
  73 + window.setTimeout(checkNotice, 5000); //5s后检测是否成功
  74 +}
  75 +/**
  76 + * 显示和隐藏
  77 + * @param {[type]} sourceClass [description]
  78 + * @param {[type]} targetClass [description]
  79 + * @return {[type]} [description]
  80 + */
  81 +function toggleDisplay(sourceClass, targetClass) {
  82 + $(sourceClass).hover(function(e) {
  83 + e.preventDefault();
  84 + var that = $(this),
  85 + target_obj = $(targetClass)[0];
  86 + if (target_obj.style.display === '') {
  87 + that.addClass('acttags');
  88 + target_obj.style.display = "block";
  89 + } else {
  90 + that.removeClass('acttags');
  91 + target_obj.style.display = "";
  92 + }
  93 + })
  94 +}
  95 +
  96 +/**
  97 + * 执行顶部显示和隐藏
  98 + * @return {[type]} [description]
  99 + */
  100 +function actionTopTagToggle() {
  101 + var tags = [{
  102 + sourceClass: '.myyoho',
  103 + targetClass: '.myyoho-info'
  104 + }, {
  105 + sourceClass: '.phone',
  106 + targetClass: '.qr'
  107 + }];
  108 + for (var i = 0; i < tags.length; i++) {
  109 + var obj = tags[i];
  110 + toggleDisplay(obj.sourceClass, obj.targetClass)
  111 + }
  112 +}
  113 +/**
  114 + * 执行顶部群组鼠标交互
  115 + * @return {[type]} [description]
  116 + */
  117 +function actionYoHoGroup() {
  118 + $('.yohogroup').mouseenter(function() {
  119 + var $this = $(this);
  120 + $this.text($this.attr('cn'));
  121 + })
  122 + $('.yohogroup').mouseleave(function() {
  123 + var $this = $(this);
  124 + $this.text($this.attr('en'));
  125 + })
  126 +}
  127 +
  128 +/**
  129 + * 检测是否支持css3的动画
  130 + * @return {Boolean} [description]
  131 + */
  132 +function isSupportCss3Animation() {
  133 + var prefixList = ['webkit', 'moz', 'ms'];
  134 + for (var i = 0; i < prefixList.length; i++) {
  135 + thisFunc = prefixList[i] + 'RequestAnimationFrame';
  136 + if (window[thisFunc]) {
  137 + return true;
  138 + } else {
  139 + return false;
  140 + }
  141 + }
  142 +
  143 +}
  144 +
  145 +/**
  146 + * css3动画闭包
  147 + * @param {Array} ) { var thisFunc, prefixList [description]
  148 + * @return {[type]} [description]
  149 + */
  150 +var requestFrame = (function() {
  151 + var thisFunc, prefixList = ['webkit', 'moz', 'ms'];
  152 + for (var i = 0; i < prefixList.length; i++) {
  153 + thisFunc = prefixList[i] + 'RequestAnimationFrame';
  154 + if (window[thisFunc]) {
  155 + return function(callback) {
  156 + window['requestAnimationFrame'](callback);
  157 + }
  158 + }
  159 + }
  160 + return function(callback) {
  161 + window.setTimeout(callback, 67);
  162 + }
  163 +})();
  164 +
  165 +
  166 +
  167 +var start = 0,
  168 + logotrans = $('.icon-logo');
  169 +var isen = true;
  170 +/**
  171 + * css3动画
  172 + * @return {[type]} [description]
  173 + */
  174 +function tsAnimate() {
  175 + start = start + 10;
  176 + logotrans.css({
  177 + "transform": 'rotateX(' + start + 'deg)',
  178 + "-webkit-transform": 'rotateX(' + start + 'deg)',
  179 + "-moz-transform": 'rotateX(' + start + 'deg)'
  180 + });
  181 + if (start / 90 % 2 == 1) { //
  182 + if (isen) {
  183 + logotrans.css("background-image", 'url(http://static.yohobuy.com/newheader/img/logo1.png)');
  184 + isen = false;
  185 + } else {
  186 + logotrans.css("background-image", 'url(http://static.yohobuy.com/newheader/img/logo_e.png)');
  187 + isen = true;
  188 + }
  189 + }
  190 + if (start / 90 % 2 == 0 && start % 360 !== 0) {
  191 + window.setTimeout(tsAnimate, 3000);
  192 + } else {
  193 + if (start % 360 === 0) {
  194 + window.setTimeout(tsAnimate, 1 * 60 * 1000);
  195 + } else {
  196 + requestFrame(function() {
  197 + tsAnimate();
  198 + })
  199 + }
  200 + }
  201 +}
  202 +
  203 +var loopdurationtime = 500;
  204 +var globaltimeout;
  205 +/**
  206 + * 淡出
  207 + * @return {[type]} [description]
  208 + */
  209 +function fadeAnimate() {
  210 + if (globaltimeout) {
  211 + window.clearTimeout(globaltimeout);
  212 + }
  213 + logotrans.fadeOut(loopdurationtime, function() {
  214 + isen = false;
  215 + logotrans.css("background-image", 'url(http://static.yohobuy.com/newheader/img/logo.png)');
  216 + logotrans.fadeIn(loopdurationtime, function() {
  217 + var onetimeoout = window.setTimeout(function() {
  218 + logotrans.fadeOut(loopdurationtime, function() {
  219 + window.clearTimeout(onetimeoout);
  220 + isen = true;
  221 + logotrans.css("background-image", 'url(http://static.yohobuy.com/newheader/img/logo_e.png)');
  222 + logotrans.fadeIn(loopdurationtime, function() {
  223 + globaltimeout = window.setTimeout(fadeAnimate, 1 * 60 * 1000);
  224 + })
  225 + })
  226 + }, 3000)
  227 + })
  228 + })
  229 +}
  230 +/**
  231 + * 执行头部logo动画
  232 + * @return {[type]} [description]
  233 + */
  234 +function actionTopLogoAnimate() {
  235 + if (isSupportCss3Animation()) {
  236 + window.setTimeout(tsAnimate, 3000);
  237 + } else {
  238 + window.setTimeout(fadeAnimate, 3000);
  239 + }
  240 +}
8 /** 241 /**
9 - * 回到顶部  
10 - * @type {[type]} 242 + * 查询跳转后保留关键字
  243 + * @return {[type]} [description]
11 */ 244 */
12 -var $returnTop = $('.return-top'); 245 +function actionAddKeyWords() {
  246 + var keywords = $('#nav_keyword').text();
  247 + var defaultsearch = 'vans';
  248 + var $query_key = $('#query_key');
  249 + if (keywords !== '') {
  250 + $query_key.css({
  251 + 'color': '#000'
  252 + });
  253 + $query_key.val(keywords);
  254 + } else {
  255 + $query_key.css({
  256 + 'color': '#e0e0e0'
  257 + });
  258 + $query_key.val(defaultsearch);
  259 + $query_key.on('focus', function(e) {
  260 + $query_key.css({
  261 + 'color': '#000'
  262 + });
  263 + $query_key.val('');
  264 + })
  265 + }
  266 +}
  267 +/**
  268 + * 搜寻的时候过滤非法字符(+-/:等非法字符单独出现)
  269 + * @type {RegExp}
  270 + */
  271 +var reg = /^[\^\!\+\-\(\)\:\[\]\\\{\}\~\*\?\|\&\;\/\s]{0,}$/g;
  272 +var keyword = '';
  273 +var link = '';
13 274
14 -$returnTop.click(function() {  
15 - $('html,body').animate({  
16 - scrollTop: 0  
17 - }, 500);  
18 -});  
  275 +window.submitSearch = function() {
  276 + var keyword_input = $('#query_key').val().replace("'", "\'");
  277 + var column = 'Search';
  278 + var postition = 'Head Search';
  279 + var event = 'Search';
  280 + getSource(column, postition, event);
  281 + if ((link != '') && (keyword != '') && ($.trim(keyword.toLowerCase()) == $.trim(keyword_input.toLowerCase()))) {
  282 + location.href = link.replace("\'", "'");
  283 + } else {
  284 + if (reg.test(keyword_input)) {
  285 + location.href = 'http://search.yohobuy.com/error?query=' + keyword_input + '&result=error';
  286 + } else {
  287 + $('#searchForm').submit();
  288 + return false;
  289 + }
  290 + }
  291 +}
  292 +/**
  293 + * banner和地址的映射
  294 + * @type {Object}
  295 + */
  296 +var bannerMap = {
  297 + listboys: '4f78b0f418fc42314d8b6e791cfb7fa8',
  298 + listgirls: '00c1f025a51b6b597dc37925951ea27d',
  299 + listkids: 'b02df11184727701ade1b6de9737d08c',
  300 + listlifestyle: 'fd35c52dced0c880976ba858346d1fc5',
  301 + searchboys: '9fb8986ea700cc27a8057361c3924394',
  302 + searchgirls: 'e3e207a1443ca60c8037fe52a5560c18',
  303 + searchkids: '620fc77f479da8feaeb06f2324e5d0bb',
  304 + searchlifestyle: 'a3c93301c6ffaf3ed0f36a4a451be36d',
  305 + uniquebrandboys: '2ebb0810c0d1a67e5229149c9c3aba7d',
  306 + uniquebrandgirls: '99e23385f4ba4b65f406b7e2968ac821',
  307 + uniquebrandkids: 'a74ebc9b17840c91b9ea46568111fe6b',
  308 + uniquebrandlifestyle: '0e8c81ead53f56302baa4d0ad967f527',
  309 + brandsboys: '77b352db07129c76a9d532acad149f9f',
  310 + brandsgirls: 'bf047f16e52ebc38be5ce9c7623831e6',
  311 + brandskids: 'e3ae1ce9b5e13c6d271ef3eccb831652',
  312 + brandslifestyle: 'e4ac8029c30f65d7f1af030980d140fe',
  313 + newboys: '869d3c5f3b450fb52101d00a61ce87cb',
  314 + newgirls: 'd953b6dfdac02483d1dcce8d96055954',
  315 + newkids: '0874cb6d75df8e0e78f2d475e53ecc08',
  316 + newlifestyle: '43e8fc8e178115c262bbce2bd0012db7',
  317 + saleboys: 'c846e3165c994769b4201d8c32f3ae9b',
  318 + salegirls: '52b1d389edcbc62d65de71b80c4d6ad0',
  319 + salekids: 'ad8b1703c761ba00973868ab5199cc27',
  320 + salelifestyle: '7acc64905c70ac91846f43fb2cec4bbd',
  321 + homeboys: 'b0856a771ef1b59ab1234c74688fa42d',
  322 + homegirls: '2bd61fa12e4933211518f70fe5ce3c48',
  323 + homekids: '895c59e8c64b40399c9533509507320c',
  324 + homelifestyle: '2e037d4e25d2767352ca3e0a4627f7bd',
  325 + indexboys: '0c911d3000f52e8ca7cffb74f5864c29',
  326 + indexgirls: 'b645b8980c423ab30485e0a9d08c2ef7',
  327 + indexkids: '17f6d5d5d454d2c507bc5fcbc90f7756',
  328 + indexlifestyle: '735cd393e841762af8793c346abbbc36'
  329 +};
  330 +/**
  331 + * cookie集合
  332 + * @type {Object}
  333 + */
  334 +var cookieMap = {};
  335 +
  336 +function exeCookieMap() {
  337 + var cookies = document.cookie;
  338 + var cookiearr = cookies.split(';');
  339 + for (var i = 0; i < cookiearr.length; i++) {
  340 + var temparr = cookiearr[i].split('=');
  341 + var key = temparr[0].replace(/\s/g, '');
  342 + cookieMap[key] = temparr[1];
  343 + }
  344 +}
  345 +
  346 +/**
  347 + * 获得banner & 异常通知
  348 + * @return {[type]} [description]
  349 + */
  350 +function actionGetBannerAndNotice() {
  351 + var url = window.location.href;
  352 + var host = window.location.host;
  353 + var code = '';
  354 + if (url.indexOf('search') !== -1) {
  355 + code = bannerMap['search' + cookieMap._Channel];
  356 + }
  357 + if (url.indexOf('list') !== -1) {
  358 + code = bannerMap['list' + cookieMap._Channel];
  359 + }
  360 + if (url.indexOf('brands') !== -1) {
  361 + code = bannerMap['brands' + cookieMap._Channel];
  362 + }
  363 + if (url.indexOf('new') !== -1) {
  364 + code = bannerMap['new' + cookieMap._Channel];
  365 + }
  366 + if (url.indexOf('sale') !== -1) {
  367 + code = bannerMap['sale' + cookieMap._Channel];
  368 + }
  369 + if (url.indexOf('home') !== -1) {
  370 + code = bannerMap['home' + cookieMap._Channel];
  371 + }
  372 + if (url.indexOf('kids') !== -1) {
  373 + code = bannerMap['indexkids'];
  374 + }
  375 + if (url.indexOf('woman') !== -1) {
  376 + code = bannerMap['indexgirls'];
  377 + }
  378 + if (url.indexOf('lifestyle') !== -1) {
  379 + code = bannerMap['indexlifestyle'];
  380 + }
  381 + if (url.indexOf('www.yohobuy.com') !== -1 && window.location.pathname === '/') {
  382 + code = bannerMap['indexboys'];
  383 + }
  384 + var firstarea = host.split('.')[0];
  385 + if (firstarea !== 'list' && firstarea !== 'search' && firstarea !== 'www' && firstarea !== 'new' && firstarea !== 'item' && firstarea !== 'guang') {
  386 + code = bannerMap['uniquebrand' + cookieMap._Channel];
  387 + }
  388 +
  389 + getBannerData(code); //获得banner信息
  390 + getNoticeData(code); //获得公告信息
  391 +
  392 +}
  393 +/**
  394 + * 品牌左右切换
  395 + * @return {[type]} [description]
  396 + */
  397 +function actionBrandChange() {
  398 + //品牌栏目切换js
  399 + if ($('.hot-brands').size() > 0) {
  400 + var activeIndex = 0,
  401 + swiperLen = $('.hot-brands').find('ul').size();
  402 + $('.hot-brands').find('ul').eq(0).css({
  403 + 'opacity': 1,
  404 + 'z-index': 2
  405 + })
  406 + $('.brands-control').on('click', '.next', function() {
  407 + if (activeIndex == swiperLen - 1) {
  408 + activeIndex = 0
  409 + } else {
  410 + activeIndex++;
  411 + }
  412 + brandSwitch(activeIndex);
  413 + });
  414 + $('.brands-control').on('click', '.prev', function() {
  415 + if (activeIndex == 0) {
  416 + activeIndex = swiperLen - 1;
  417 + } else {
  418 + activeIndex--;
  419 + }
  420 + brandSwitch(activeIndex);
  421 + });
  422 +
  423 + function brandSwitch(index) {
  424 + $('.hot-brands').find('ul').stop().animate({
  425 + 'opacity': 0,
  426 + 'z-index': 1
  427 + }, 200).eq(index).animate({
  428 + 'opacity': 1,
  429 + 'z-index': 2
  430 + }, 200);
  431 + }
  432 + }
  433 +}
  434 +/**
  435 + * 初始化函数
  436 + * @return {[type]} [description]
  437 + */
  438 +exports.init = function() {
  439 + actionYoHoGroup(); //执行顶部群组鼠标交互
  440 + actionTopTagToggle(); //执行顶部显示和隐藏
  441 + actionTopLogoAnimate(); //执行头部logo动画
  442 + actionGetBannerAndNotice();//获取顶部banner&服务器异常通知
  443 + actionBrandChange();//品牌左右切换
  444 + actionAddKeyWords(); //查询跳转后保留关键字
  445 +}
@@ -58,7 +58,6 @@ class BoysController extends AbstractAction @@ -58,7 +58,6 @@ class BoysController extends AbstractAction
58 'link'=>'' 58 'link'=>''
59 ) 59 )
60 ) 60 )
61 -  
62 ) 61 )
63 ) 62 )
64 ), 63 ),
@@ -79,7 +78,6 @@ class BoysController extends AbstractAction @@ -79,7 +78,6 @@ class BoysController extends AbstractAction
79 'link'=>'' 78 'link'=>''
80 ) 79 )
81 ) 80 )
82 -  
83 ) 81 )
84 ) 82 )
85 ) 83 )
@@ -109,7 +107,6 @@ class BoysController extends AbstractAction @@ -109,7 +107,6 @@ class BoysController extends AbstractAction
109 'link'=>'' 107 'link'=>''
110 ) 108 )
111 ) 109 )
112 -  
113 ) 110 )
114 ) 111 )
115 ), 112 ),
@@ -130,7 +127,6 @@ class BoysController extends AbstractAction @@ -130,7 +127,6 @@ class BoysController extends AbstractAction
130 'link'=>'' 127 'link'=>''
131 ) 128 )
132 ) 129 )
133 -  
134 ) 130 )
135 ) 131 )
136 ), 132 ),
@@ -151,7 +147,6 @@ class BoysController extends AbstractAction @@ -151,7 +147,6 @@ class BoysController extends AbstractAction
151 'link'=>'' 147 'link'=>''
152 ) 148 )
153 ) 149 )
154 -  
155 ) 150 )
156 ) 151 )
157 ) 152 )
@@ -174,15 +169,18 @@ class BoysController extends AbstractAction @@ -174,15 +169,18 @@ class BoysController extends AbstractAction
174 'name' =>'我的收藏', 169 'name' =>'我的收藏',
175 'link' =>'', 170 'link' =>'',
176 'num' => '1' 171 'num' => '1'
177 - ),array( 172 + ),
  173 + array(
178 'name' =>'我的优惠券', 174 'name' =>'我的优惠券',
179 'link' =>'', 175 'link' =>'',
180 'num' => '2' 176 'num' => '2'
181 - ),array( 177 + ),
  178 + array(
182 'name' =>'我的YOHO币', 179 'name' =>'我的YOHO币',
183 'link' =>'', 180 'link' =>'',
184 'num' => '1' 181 'num' => '1'
185 - ),array( 182 + ),
  183 + array(
186 'name' =>'我的退货换货', 184 'name' =>'我的退货换货',
187 'link' =>'', 185 'link' =>'',
188 'num' => '1' 186 'num' => '1'