Authored by 周少峰

Merge branch 'feature/onlineService' into 'release/5.5.1'

Feature/online service

在线客服 头部和底部优化

See merge request !102
/**
* Created by Gexuhui on 2017/0321.
*/
'use strict';
exports.if_cond = function(left, operator, right, options) {
switch (operator) {
case '==':
return (left == right) ? options.fn(this) : options.inverse(this); // eslint-disable-line
case '!=':
return (left != right) ? options.fn(this) : options.inverse(this); // eslint-disable-line
case '===':
return (left === right) ? options.fn(this) : options.inverse(this);
case '<':
return (left < right) ? options.fn(this) : options.inverse(this);
case '<=':
return (left <= right) ? options.fn(this) : options.inverse(this);
case '>':
return (left > right) ? options.fn(this) : options.inverse(this);
case '>=':
return (left >= right) ? options.fn(this) : options.inverse(this);
case '&&':
return (left && right) ? options.fn(this) : options.inverse(this);
case '||':
return (left || right) ? options.fn(this) : options.inverse(this);
default:
return options.inverse(this);
}
};
... ...
... ... @@ -24,7 +24,7 @@
layoutsDir: doraemon,
partialsDir: [path.join(__dirname, 'views/partial')],
views: path.join(__dirname, 'views/action'),
helpers: global.yoho.helpers
helpers: Object.assign(require('./helper'), global.yoho.helpers)
}));
// router
... ...
... ... @@ -124,12 +124,15 @@ const _processHomeCategoryFaq = (list) => {
switch (item.categoryName) {
case '新手指南':
_.forEach(item.categoryItems, (ng, k) => {
ng.index = k + 1;
});
item.categoryItems = _.chunk(item.categoryItems, 6);
item.num = _.flattenDeep(item.categoryItems).length;
result.newGuide = item;
break;
case '公告':
_.forEach(item.contentItems, (c, k) => {
... ...
... ... @@ -32,7 +32,9 @@
{{#each categoryItems}}
<li>
{{#each .}}
<a href="{{jumpLink}}" target="_blank" {{#if @first}}style="margin-left: 0;"{{/if}} data-index={{index}}>
<a href="{{jumpLink}}" target="_blank" {{#if @first}}style="margin-left: 0;"{{/if}}
{{#if_cond ../../num '==' 4}}style="margin-left: 158px;"{{/if_cond}}
{{#if_cond ../../num '==' 5}}style="margin-left: 104.5px;"{{/if_cond}} data-index={{index}}>
<img src="{{categoryIco}}" width="55" height="55">
<p>{{categoryName}}</p>
</a>
... ... @@ -40,6 +42,7 @@
</li>
{{/each}}
</ul>
{{/newGuide}}
{{#selfService}}
... ...
... ... @@ -300,10 +300,10 @@
<a href="//www.yohobuy.com/help/detail?id=51" target="_blank">退换货流程</a>
</p>
<p>
<a href="//www.yohobuy.com/help/detail?id=53" target="_blank">时效承诺</a>
<a href="//www.yohobuy.com/help/detail?id=55" target="_blank">投诉与建议</a>
</p>
<p>
<a href="//www.yohobuy.com/help/detail?id=55" target="_blank">投诉与建议</a>
<a href="{{#if @root.pc.clientService.new}}http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409{{else}}//www.yohobuy.com/service/client{{/if}}" target="_blank">在线客服</a>
</p>
</li>
<li class="left">
... ...
... ... @@ -46,10 +46,18 @@
<span class="icon-mail"></span>
<a href="//www.yohobuy.com/home/message?t=1453168898.0176">消息</a>
</li>
<li class="help">
<li class="help nav-drop-down-container">
<span class="tag-seprate"></span>
<span class="iconfont">&#xe6d6;</span>
<a href="//www.yohobuy.com/help">帮助中心</a>
<span class="iconfont">&#xe702;</span>
<a href="#">客户服务</a>
<ul class="nav-drop-down">
<li>
<a href="{{#if @root.pc.clientService.new}}http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409{{else}}//www.yohobuy.com/service/client{{/if}}" target="_blank">在线客服</a>
</li>
<li>
<a href="//www.yohobuy.com/help">帮助中心</a>
</li>
</ul>
</li>
<li class="phoneapp">
<span class="tag-seprate"></span>
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Mon Mar 6 13:49:44 2017
Created by FontForge 20120731 at Tue Mar 21 10:18:08 2017
By admin
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Mar 6 13:49:44 2017
bbox="-6 -212 2176 996"
underline-thickness="0"
underline-position="0"
unicode-range="U+0078-E701"
unicode-range="U+0078-E702"
/>
<missing-glyph
/>
... ... @@ -346,5 +346,9 @@ d="M512 384zM32 384q0 -130 64.5 -240.5t175 -175t240.5 -64.5t240.5 64.5t175 175t6
<glyph glyph-name="weibiaoti-7" unicode="&#xe6f9;"
d="M1017 -106l-278 278q55 58 85.5 133t30.5 158q0 115 -57 212.5t-154.5 154.5t-212 57t-212 -57t-154 -154.5t-56.5 -212.5t56.5 -212.5t154 -154t212.5 -56.5q83 0 158 30.5t133 85.5l279 -279zM432 62q-109 0 -201 54t-146 146t-54 201t54 201.5t146 146t201 53.5
t201.5 -53.5t146 -146t53.5 -201.5t-53.5 -201t-146 -146t-201.5 -54z" />
<glyph glyph-name="F" unicode="&#xe702;"
d="M1000 391q0 98 -38.5 187t-103 153.5t-154.5 102.5t-189 38t-190 -38t-156.5 -102.5t-105 -154t-39.5 -186.5q0 -2 -0.5 -5.5t-0.5 -4.5v-246q0 -24 23.5 -37.5t55.5 -13.5h63q29 0 46.5 12.5t17.5 38.5v242q0 27 -18.5 50.5t-45.5 23.5h-74q-3 0 -7 -2.5t-5 -2.5
q13 107 74 194.5t157 137.5t207 50q112 0 208.5 -50.5t157.5 -138.5t73 -195q-20 7 -23 7h-74q-23 0 -45 -21t-22 -44v-251q0 -24 23.5 -37.5t55.5 -13.5h62q29 0 47 12.5t18 38.5v242q0 1 1.5 6.5t0.5 7.5zM91 405h74q9 0 13.5 -10t4.5 -18v-242q0 -6 -18 -6h-63
q-33 0 -33 6v251q0 3 8.5 11t13.5 8v0zM952 135q0 -6 -19 -6h-62q-33 0 -33 6v251q0 3 8.5 11t12.5 8h74q10 0 14.5 -10.5t4.5 -17.5v-242z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -20,7 +20,8 @@ var $head = $('.head-wrapper'),
$goCart = $head.find('.go-cart'),
$myYohoBox = $('#myYohoBox'),
$goodsNum = $goCart.find('.goods-num-tip'),
$miniCart = $head.find('.mini-cart-wrapper');
$miniCart = $head.find('.mini-cart-wrapper'),
$dropDown = $tool.find('.nav-drop-down-container');
var $subNav = $('.sub-nav-list.cure .contain-third');
... ... @@ -617,6 +618,14 @@ fetchUserInfoEvent.add(function() {
syncLoginInfo();
});
$dropDown.hover(function() {
$(this).find('.nav-drop-down').slideDown();
$(this).addClass('nav-drop-down-hover');
}).mouseleave(function() {
$(this).find('.nav-drop-down').hide();
$(this).removeClass('nav-drop-down-hover');
});
$myYohoBox.hover(function() {
var uid = getUid(); // eslint-disable-line
... ...
... ... @@ -878,6 +878,67 @@
}
}
}
.nav-drop-down-container {
width: 89px;
box-sizing: border-box;
position: relative;
.nav-drop-down-title {
color: #8e8e8e;
font-size: 12px;
}
&.nav-drop-down-hover{
position: relative;
&:before {
position: absolute;
top: 0;
left: 1px;
content: '';
display: inline-block;
width: 88px;
height: 32px;
background-color: rgb(220,220,220);
box-sizing: border-box;
}
&>a {
position: relative;
}
}
}
.nav-drop-down {
top: 32px;
margin-left: 1px;
width: 88px;
position: absolute;
background-color: rgb(220,220,220);
z-index: 100;
}
.tool-wrapper {
.yoho-buy-tools {
.nav-drop-down {
display: none;
li {
float: none;
padding: 0;
position: relative;
width: 88px;
height: 33px;
border-top: 1px solid #c9c9c9;
box-sizing: border-box;
line-height: 33px;
text-align: center;
a{
display: inline-block;
width: 88px;
height: 33px;
line-height: 33px;
box-sizing: border-box;
}
}
}
}
}
}
.yoho-header.boys {
... ...
... ... @@ -118,7 +118,7 @@
margin: 0 auto 30px;
height: auto;
overflow: hidden;
padding: 0 15px;
padding: 0 20px;
box-sizing: border-box;
li {
... ... @@ -144,11 +144,11 @@
}
.new-guide a {
margin-left: 74px;
margin-left: 72.4px;
}
.self-service {
padding: 0 20px;
padding: 0 20px;
a {
margin-left: 158px;
... ...