Authored by yyq

Merge branch 'feature/zookeeper' of git.yoho.cn:fe/yohobuy-node into feature/zookeeper

... ... @@ -658,16 +658,18 @@
<div class="service"></div>
{{#if latestWalk}}
<div class="info-block latest-walk">
<input id="latest-walk-count" type="hidden" value="{{latestWalk}}">
<p class="block-title">
<span class="title cur">最近浏览 RECENT REVIEW</span>
</p>
<div id="latest-walk-goods" class="goods clearfix"></div>
{{> product/latest-walk-tpl}}
</div>
{{/if}}
{{#unless @root.pc.product.removeRecentView}}
{{#if latestWalk}}
<div class="info-block latest-walk">
<input id="latest-walk-count" type="hidden" value="{{latestWalk}}">
<p class="block-title">
<span class="title cur">最近浏览 RECENT REVIEW</span>
</p>
<div id="latest-walk-goods" class="goods clearfix"></div>
{{> product/latest-walk-tpl}}
</div>
{{/if}}
{{/unless}}
</div>
</div>
{{/ detail}}
... ...
... ... @@ -22,7 +22,7 @@
[ <a id="signin-url" href="//www.yohobuy.com/signin.html" class="loginbar">请登录</a> ]
[ <a id="reg-url" href="//www.yohobuy.com/reg.html" class="registbar">免费注册</a> ]
</li>
<li class="myyoho" id="myYohoBox">
<li class="myyoho" id="myYohoBox" data-hung="{{@root.pc.common.disMyYohoHover}}">
<span class="tag-seprate"></span>
<a href="//www.yohobuy.com/home?t=1453340799.4986">MY有货</a>
<span class="icon-bottomarrow"></span>
... ... @@ -66,7 +66,8 @@
<div class="main-logo"><a href="//www.yohobuy.com/" class="main-link"></a></div>
<ul class="main-nav-list">
{{# navbars}}
<li class="{{type}}"{{#if ico}} style="background: url({{image ico 54 32}}) no-repeat center center"{{/if}}>
<li class="{{type}}"{{#if ico}}
style="background: url({{image ico 54 32}}) no-repeat center center"{{/if}}>
{{#if ico}}
<a href="{{link}}"{{#if isNewPage}} target="_blank"{{/if}} class="menu-ico"></a>
{{^}}
... ... @@ -85,7 +86,11 @@
<div class="search-2016">
<form action="//search.yohobuy.com" method="get" id="search-form">
<input type="hidden" id="defaultsearch">
<input class="search-key" type="text" name="query" 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">
<input class="search-key" type="text" name="query" 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">
<a class="search-btn" href="javascript:submitSearch();"></a>
</form>
</div>
... ... @@ -111,39 +116,40 @@
<div class="nav-wrapper clearfix">
<div class="center-content">
{{# subNavGroup}}
<ul class="sub-nav-list {{subType}}">
{{# subNav}}
<li {{#if thirdNav}}class="contain-third"{{/if}}>
<a href="{{link}}">{{name}}
{{#if isNew}}
<span class="newlogo"></span>
{{/if}}
</a>
{{#if thirdNav}}
<div class="third-nav-wrapper">
<div class="center-content">
<dl class="hide-list hide">
{{# thirdNav}}
<dt>
<h1 class=""><a href="{{link}}">{{title}}</a> </h1>
</dt>
{{#brandItems}}
<dd>
<a href="{{link}}"{{#if hot}} class="hot"{{/if}}>{{brandName}}</a>
</dd>
{{/brandItems}}
{{/thirdNav}}
</dl>
<div class="show-detail" data-code="{{imgCode}}">
<a><img src="data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=="></a>
<a class="title">热门小物优选</a>
<ul class="sub-nav-list {{subType}}">
{{# subNav}}
<li {{#if thirdNav}}class="contain-third"{{/if}}>
<a href="{{link}}">{{name}}
{{#if isNew}}
<span class="newlogo"></span>
{{/if}}
</a>
{{#if thirdNav}}
<div class="third-nav-wrapper">
<div class="center-content">
<dl class="hide-list hide">
{{# thirdNav}}
<dt>
<h1 class=""><a href="{{link}}">{{title}}</a></h1>
</dt>
{{#brandItems}}
<dd>
<a href="{{link}}"{{#if hot}}
class="hot"{{/if}}>{{brandName}}</a>
</dd>
{{/brandItems}}
{{/thirdNav}}
</dl>
<div class="show-detail" data-code="{{imgCode}}">
<a><img src="data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=="></a>
<a class="title">热门小物优选</a>
</div>
</div>
</div>
</div>
{{/if}}
</li>
{{/ subNav}}
</ul>
{{/if}}
</li>
{{/ subNav}}
</ul>
{{/ subNavGroup}}
</div>
</div>
... ... @@ -155,7 +161,7 @@
</script>
<script type="text/html" id="simple-account-info-tpl">
<div class="account-info-header">
<div class="user-img" >
<div class="user-img">
<img src="\{{headIco}}">
</div>
<div class="user-name">
... ... @@ -165,15 +171,15 @@
VIP: <span>\{{curTitle}}</span>
</h3>
\{{#unless vip3}}
<div class="level-detail">
<div class="level-view-bar">
<div class="text-span">
\{{curYearCost}}/\{{nextVipNeedCost}}
</div>
<p class="\{{#if curYearCostPer}}integrate\{{/if}}" style="width: \{{curYearCostPer}}%;"></p>
<div class="level-detail">
<div class="level-view-bar">
<div class="text-span">
\{{curYearCost}}/\{{nextVipNeedCost}}
</div>
<span>\{{nextVipTitle}}</span>
<p class="\{{#if curYearCostPer}}integrate\{{/if}}" style="width: \{{curYearCostPer}}%;"></p>
</div>
<span>\{{nextVipTitle}}</span>
</div>
\{{/unless}}
</div>
<ul class="account-info-content">
... ... @@ -199,79 +205,82 @@
</li>
</ul>
<div class="account-info-footer">
<a href="//www.yohobuy.com/home/user?t=\{{timestamp}}">完善资料 <span>(学生认证)</span></a>
<a href="//www.yohobuy.com/home/user?t=\{{timestamp}}">完善资料 <span>(学生认证)</span></a>
</div>
</script>
<script type="text/html" id="mini-cart-tpl">
\{{#carData}}
<div class="rich-cart">
<div class="goods-list">
\{{# totalGoods}}
\{{#notzero buy_number}}
<div class="goods-item">
<div class="goods-img">
<a href="\{{product_url}}">
<img src="\{{default_img}}"/>
</a>
</div>
<div class="goods-info">
<p class="title">
<a href="\{{product_url}}">\{{product_name}}</a>
</p>
<p>
颜色:\{{color_name}}
尺码:\{{size_name}}
</p>
</div>
<div class="goods-price">
<p>\{{show_price}} x \{{buy_number}}</p>
<p>
<a href="javascript:void(0)" class="cart-goods-del" data-id="\{{goods_incart_id}}" data-cheapest="\{{is_cheapest_free}}" data-sku="\{{product_sku}}" data-proid="\{{promotion_id}}" data-num="\{{buy_number}}">删除</a>
</p>
</div>
</div>
\{{/notzero}}
\{{/ totalGoods}}
\{{#if has_promotion}}
<div class="activity-item">
<label class="activity-name">活动</label>
<h3 class="activity-content">
\{{#if fit_outlet_promotion }}
购outlet商品,满¥1999再享9折
\{{/if}}
\{{#if has_other_promotion}}
<span class="mycart_i_down" title="更多" ></span>
\{{/if}}
\{{#if has_first_promotion}}
\{{first_promotions.promotion_title}}
\{{/if}}
</h3>
</div>
\{{/if}}
\{{#if fit_free_shipping }}
<div class="activity-item">
<label class="activity-name">免运费</label>
<h3 class="activity-content">全场满 ¥\{{fit_free_shipping}}免运费</h3>
</div>
\{{/if}}
</div>
<div class="go-full-cart">
<div>
<a href="//www.yohobuy.com/shopping/cart">去购物车结算</a>
\{{#carData}}
<div class="rich-cart">
<div class="goods-list">
\{{# totalGoods}}
\{{#notzero buy_number}}
<div class="goods-item">
<div class="goods-img">
<a href="\{{product_url}}">
<img src="\{{default_img}}"/>
</a>
</div>
<div class="goods-info">
<p class="title">
<a href="\{{product_url}}">\{{product_name}}</a>
</p>
<p>
颜色:\{{color_name}}
尺码:\{{size_name}}
</p>
</div>
<div class="goods-price">
<p>\{{show_price}} x \{{buy_number}}</p>
<p>
<a href="javascript:void(0)" class="cart-goods-del" data-id="\{{goods_incart_id}}"
data-cheapest="\{{is_cheapest_free}}" data-sku="\{{product_sku}}"
data-proid="\{{promotion_id}}" data-num="\{{buy_number}}">删除</a>
</p>
</div>
</div>
\{{/notzero}}
\{{/ totalGoods}}
\{{#if has_promotion}}
<div class="activity-item">
<label class="activity-name">活动</label>
<h3 class="activity-content">
\{{#if fit_outlet_promotion }}
购outlet商品,满¥1999再享9折
\{{/if}}
\{{#if has_other_promotion}}
<span class="mycart_i_down" title="更多"></span>
\{{/if}}
\{{#if has_first_promotion}}
\{{first_promotions.promotion_title}}
\{{/if}}
</h3>
</div>
\{{/if}}
\{{#if fit_free_shipping }}
<div class="activity-item">
<label class="activity-name">免运费</label>
<h3 class="activity-content">全场满 ¥\{{fit_free_shipping}}免运费</h3>
</div>
\{{/if}}
</div>
<div class="go-full-cart">
<div>
<a href="//www.yohobuy.com/shopping/cart">去购物车结算</a>
</div>
</div>
\{{/carData}}
</div>
\{{/carData}}
</script>
<script type="text/html" id="search-suggest-tml">
\{{#data}}
<li>
<a style="display: block;" href="\{{href}}" class="clearfix clear search-item" title="\{{keyword}}" act="\{{href}}">
<span class="searchvalue" >\{{keyword}}</span>
<span class="valuenum">约\{{count}}个商品</span>
</a>
</li>
\{{/data}}
\{{#data}}
<li>
<a style="display: block;" href="\{{href}}" class="clearfix clear search-item" title="\{{keyword}}"
act="\{{href}}">
<span class="searchvalue">\{{keyword}}</span>
<span class="valuenum">约\{{count}}个商品</span>
</a>
</li>
\{{/data}}
</script>
</div>
... ...
{{#if latestWalk}}
<input id="latest-walk-count" type="hidden" value="{{latestWalk}}">
<div class="latest-walk">
<h2>最近浏览的商品</h2>
<div id="latest-walk-goods" class="goods clearfix"></div>
</div>
{{#unless @root.pc.product.removeRecentView}}
{{#if latestWalk}}
<input id="latest-walk-count" type="hidden" value="{{latestWalk}}">
<div class="latest-walk">
<h2>最近浏览的商品</h2>
<div id="latest-walk-goods" class="goods clearfix"></div>
</div>
{{> product/latest-walk-tpl}}
{{/if}}
{{> product/latest-walk-tpl}}
{{/if}}
{{/unless}}
... ...
... ... @@ -77,11 +77,12 @@ var bannerMap = {
},
cookieMap = {};
var $signinBtn = $('#signin-url');
var $regBtn = $('#reg-url');
var __DEGRADATION_CONFIG = {
hungMyYoho: $myYohoBox.data('hung') === 'true'
};
$signinBtn.attr('href', '//www.yohobuy.com/signin.html?refer=' + window.location.href);
$regBtn.attr('href', '//www.yohobuy.com/reg.html?refer=' + window.location.href);
$('#signin-url').attr('href', '//www.yohobuy.com/signin.html?refer=' + window.location.href);
$('#reg-url').attr('href', '//www.yohobuy.com/reg.html?refer=' + window.location.href);
// handlebars模板
centerFn = handlebars.compile($('#simple-account-info-tpl').html() || '');
... ... @@ -550,7 +551,12 @@ cartTimer = setInterval(syncCratInfo, 2000); // 定时同步购物车数量
$loginBox.show();
}());
fetchUserInfoEvent.add(syncLoginInfo);
fetchUserInfoEvent.add(function() {
if (__DEGRADATION_CONFIG.hungMyYoho) {
return;
}
syncLoginInfo();
});
$myYohoBox.hover(function() {
var uid = getUid(); // eslint-disable-line
... ...