Merge branch 'feature/onlineService' into 'release/5.5.1'
Feature/online service 在线客服 头部和底部优化 See merge request !102
Showing
13 changed files
with
132 additions
and
13 deletions
apps/help/helper/index.js
0 → 100644
1 | +/** | ||
2 | + * Created by Gexuhui on 2017/0321. | ||
3 | + */ | ||
4 | + | ||
5 | +'use strict'; | ||
6 | + | ||
7 | +exports.if_cond = function(left, operator, right, options) { | ||
8 | + switch (operator) { | ||
9 | + case '==': | ||
10 | + return (left == right) ? options.fn(this) : options.inverse(this); // eslint-disable-line | ||
11 | + case '!=': | ||
12 | + return (left != right) ? options.fn(this) : options.inverse(this); // eslint-disable-line | ||
13 | + case '===': | ||
14 | + return (left === right) ? options.fn(this) : options.inverse(this); | ||
15 | + case '<': | ||
16 | + return (left < right) ? options.fn(this) : options.inverse(this); | ||
17 | + case '<=': | ||
18 | + return (left <= right) ? options.fn(this) : options.inverse(this); | ||
19 | + case '>': | ||
20 | + return (left > right) ? options.fn(this) : options.inverse(this); | ||
21 | + case '>=': | ||
22 | + return (left >= right) ? options.fn(this) : options.inverse(this); | ||
23 | + case '&&': | ||
24 | + return (left && right) ? options.fn(this) : options.inverse(this); | ||
25 | + case '||': | ||
26 | + return (left || right) ? options.fn(this) : options.inverse(this); | ||
27 | + default: | ||
28 | + return options.inverse(this); | ||
29 | + } | ||
30 | +}; | ||
31 | + |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | layoutsDir: doraemon, | 24 | layoutsDir: doraemon, |
25 | partialsDir: [path.join(__dirname, 'views/partial')], | 25 | partialsDir: [path.join(__dirname, 'views/partial')], |
26 | views: path.join(__dirname, 'views/action'), | 26 | views: path.join(__dirname, 'views/action'), |
27 | - helpers: global.yoho.helpers | 27 | + helpers: Object.assign(require('./helper'), global.yoho.helpers) |
28 | })); | 28 | })); |
29 | 29 | ||
30 | // router | 30 | // router |
@@ -124,12 +124,15 @@ const _processHomeCategoryFaq = (list) => { | @@ -124,12 +124,15 @@ const _processHomeCategoryFaq = (list) => { | ||
124 | 124 | ||
125 | switch (item.categoryName) { | 125 | switch (item.categoryName) { |
126 | case '新手指南': | 126 | case '新手指南': |
127 | + | ||
127 | _.forEach(item.categoryItems, (ng, k) => { | 128 | _.forEach(item.categoryItems, (ng, k) => { |
128 | ng.index = k + 1; | 129 | ng.index = k + 1; |
129 | }); | 130 | }); |
130 | 131 | ||
131 | item.categoryItems = _.chunk(item.categoryItems, 6); | 132 | item.categoryItems = _.chunk(item.categoryItems, 6); |
133 | + item.num = _.flattenDeep(item.categoryItems).length; | ||
132 | result.newGuide = item; | 134 | result.newGuide = item; |
135 | + | ||
133 | break; | 136 | break; |
134 | case '公告': | 137 | case '公告': |
135 | _.forEach(item.contentItems, (c, k) => { | 138 | _.forEach(item.contentItems, (c, k) => { |
@@ -32,7 +32,9 @@ | @@ -32,7 +32,9 @@ | ||
32 | {{#each categoryItems}} | 32 | {{#each categoryItems}} |
33 | <li> | 33 | <li> |
34 | {{#each .}} | 34 | {{#each .}} |
35 | - <a href="{{jumpLink}}" target="_blank" {{#if @first}}style="margin-left: 0;"{{/if}} data-index={{index}}> | 35 | + <a href="{{jumpLink}}" target="_blank" {{#if @first}}style="margin-left: 0;"{{/if}} |
36 | + {{#if_cond ../../num '==' 4}}style="margin-left: 158px;"{{/if_cond}} | ||
37 | + {{#if_cond ../../num '==' 5}}style="margin-left: 104.5px;"{{/if_cond}} data-index={{index}}> | ||
36 | <img src="{{categoryIco}}" width="55" height="55"> | 38 | <img src="{{categoryIco}}" width="55" height="55"> |
37 | <p>{{categoryName}}</p> | 39 | <p>{{categoryName}}</p> |
38 | </a> | 40 | </a> |
@@ -40,6 +42,7 @@ | @@ -40,6 +42,7 @@ | ||
40 | </li> | 42 | </li> |
41 | {{/each}} | 43 | {{/each}} |
42 | </ul> | 44 | </ul> |
45 | + | ||
43 | {{/newGuide}} | 46 | {{/newGuide}} |
44 | 47 | ||
45 | {{#selfService}} | 48 | {{#selfService}} |
@@ -300,10 +300,10 @@ | @@ -300,10 +300,10 @@ | ||
300 | <a href="//www.yohobuy.com/help/detail?id=51" target="_blank">退换货流程</a> | 300 | <a href="//www.yohobuy.com/help/detail?id=51" target="_blank">退换货流程</a> |
301 | </p> | 301 | </p> |
302 | <p> | 302 | <p> |
303 | - <a href="//www.yohobuy.com/help/detail?id=53" target="_blank">时效承诺</a> | 303 | + <a href="//www.yohobuy.com/help/detail?id=55" target="_blank">投诉与建议</a> |
304 | </p> | 304 | </p> |
305 | <p> | 305 | <p> |
306 | - <a href="//www.yohobuy.com/help/detail?id=55" target="_blank">投诉与建议</a> | 306 | + <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> |
307 | </p> | 307 | </p> |
308 | </li> | 308 | </li> |
309 | <li class="left"> | 309 | <li class="left"> |
@@ -46,10 +46,18 @@ | @@ -46,10 +46,18 @@ | ||
46 | <span class="icon-mail"></span> | 46 | <span class="icon-mail"></span> |
47 | <a href="//www.yohobuy.com/home/message?t=1453168898.0176">消息</a> | 47 | <a href="//www.yohobuy.com/home/message?t=1453168898.0176">消息</a> |
48 | </li> | 48 | </li> |
49 | - <li class="help"> | 49 | + <li class="help nav-drop-down-container"> |
50 | <span class="tag-seprate"></span> | 50 | <span class="tag-seprate"></span> |
51 | - <span class="iconfont"></span> | ||
52 | - <a href="//www.yohobuy.com/help">帮助中心</a> | 51 | + <span class="iconfont"></span> |
52 | + <a href="#">客户服务</a> | ||
53 | + <ul class="nav-drop-down"> | ||
54 | + <li> | ||
55 | + <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> | ||
56 | + </li> | ||
57 | + <li> | ||
58 | + <a href="//www.yohobuy.com/help">帮助中心</a> | ||
59 | + </li> | ||
60 | + </ul> | ||
53 | </li> | 61 | </li> |
54 | <li class="phoneapp"> | 62 | <li class="phoneapp"> |
55 | <span class="tag-seprate"></span> | 63 | <span class="tag-seprate"></span> |
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Mon Mar 6 13:49:44 2017 | 5 | +Created by FontForge 20120731 at Tue Mar 21 10:18:08 2017 |
6 | By admin | 6 | By admin |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Mar 6 13:49:44 2017 | @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Mar 6 13:49:44 2017 | ||
19 | bbox="-6 -212 2176 996" | 19 | bbox="-6 -212 2176 996" |
20 | underline-thickness="0" | 20 | underline-thickness="0" |
21 | underline-position="0" | 21 | underline-position="0" |
22 | - unicode-range="U+0078-E701" | 22 | + unicode-range="U+0078-E702" |
23 | /> | 23 | /> |
24 | <missing-glyph | 24 | <missing-glyph |
25 | /> | 25 | /> |
@@ -346,5 +346,9 @@ d="M512 384zM32 384q0 -130 64.5 -240.5t175 -175t240.5 -64.5t240.5 64.5t175 175t6 | @@ -346,5 +346,9 @@ d="M512 384zM32 384q0 -130 64.5 -240.5t175 -175t240.5 -64.5t240.5 64.5t175 175t6 | ||
346 | <glyph glyph-name="weibiaoti-7" unicode="" | 346 | <glyph glyph-name="weibiaoti-7" unicode="" |
347 | 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 | 347 | 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 |
348 | t201.5 -53.5t146 -146t53.5 -201.5t-53.5 -201t-146 -146t-201.5 -54z" /> | 348 | t201.5 -53.5t146 -146t53.5 -201.5t-53.5 -201t-146 -146t-201.5 -54z" /> |
349 | + <glyph glyph-name="F" unicode="" | ||
350 | +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 | ||
351 | +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 | ||
352 | +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" /> | ||
349 | </font> | 353 | </font> |
350 | </defs></svg> | 354 | </defs></svg> |
No preview for this file type
No preview for this file type
@@ -20,7 +20,8 @@ var $head = $('.head-wrapper'), | @@ -20,7 +20,8 @@ var $head = $('.head-wrapper'), | ||
20 | $goCart = $head.find('.go-cart'), | 20 | $goCart = $head.find('.go-cart'), |
21 | $myYohoBox = $('#myYohoBox'), | 21 | $myYohoBox = $('#myYohoBox'), |
22 | $goodsNum = $goCart.find('.goods-num-tip'), | 22 | $goodsNum = $goCart.find('.goods-num-tip'), |
23 | - $miniCart = $head.find('.mini-cart-wrapper'); | 23 | + $miniCart = $head.find('.mini-cart-wrapper'), |
24 | + $dropDown = $tool.find('.nav-drop-down-container'); | ||
24 | 25 | ||
25 | var $subNav = $('.sub-nav-list.cure .contain-third'); | 26 | var $subNav = $('.sub-nav-list.cure .contain-third'); |
26 | 27 | ||
@@ -617,6 +618,14 @@ fetchUserInfoEvent.add(function() { | @@ -617,6 +618,14 @@ fetchUserInfoEvent.add(function() { | ||
617 | syncLoginInfo(); | 618 | syncLoginInfo(); |
618 | }); | 619 | }); |
619 | 620 | ||
621 | +$dropDown.hover(function() { | ||
622 | + $(this).find('.nav-drop-down').slideDown(); | ||
623 | + $(this).addClass('nav-drop-down-hover'); | ||
624 | +}).mouseleave(function() { | ||
625 | + $(this).find('.nav-drop-down').hide(); | ||
626 | + $(this).removeClass('nav-drop-down-hover'); | ||
627 | +}); | ||
628 | + | ||
620 | $myYohoBox.hover(function() { | 629 | $myYohoBox.hover(function() { |
621 | var uid = getUid(); // eslint-disable-line | 630 | var uid = getUid(); // eslint-disable-line |
622 | 631 |
@@ -878,6 +878,67 @@ | @@ -878,6 +878,67 @@ | ||
878 | } | 878 | } |
879 | } | 879 | } |
880 | } | 880 | } |
881 | + | ||
882 | + .nav-drop-down-container { | ||
883 | + width: 89px; | ||
884 | + box-sizing: border-box; | ||
885 | + position: relative; | ||
886 | + .nav-drop-down-title { | ||
887 | + color: #8e8e8e; | ||
888 | + font-size: 12px; | ||
889 | + } | ||
890 | + &.nav-drop-down-hover{ | ||
891 | + position: relative; | ||
892 | + &:before { | ||
893 | + position: absolute; | ||
894 | + top: 0; | ||
895 | + left: 1px; | ||
896 | + content: ''; | ||
897 | + display: inline-block; | ||
898 | + width: 88px; | ||
899 | + height: 32px; | ||
900 | + background-color: rgb(220,220,220); | ||
901 | + box-sizing: border-box; | ||
902 | + } | ||
903 | + &>a { | ||
904 | + position: relative; | ||
905 | + } | ||
906 | + } | ||
907 | + } | ||
908 | + | ||
909 | + .nav-drop-down { | ||
910 | + top: 32px; | ||
911 | + margin-left: 1px; | ||
912 | + width: 88px; | ||
913 | + position: absolute; | ||
914 | + background-color: rgb(220,220,220); | ||
915 | + z-index: 100; | ||
916 | + } | ||
917 | + .tool-wrapper { | ||
918 | + .yoho-buy-tools { | ||
919 | + .nav-drop-down { | ||
920 | + display: none; | ||
921 | + li { | ||
922 | + float: none; | ||
923 | + padding: 0; | ||
924 | + position: relative; | ||
925 | + width: 88px; | ||
926 | + height: 33px; | ||
927 | + border-top: 1px solid #c9c9c9; | ||
928 | + box-sizing: border-box; | ||
929 | + line-height: 33px; | ||
930 | + text-align: center; | ||
931 | + a{ | ||
932 | + display: inline-block; | ||
933 | + width: 88px; | ||
934 | + height: 33px; | ||
935 | + line-height: 33px; | ||
936 | + box-sizing: border-box; | ||
937 | + } | ||
938 | + } | ||
939 | + } | ||
940 | + } | ||
941 | + } | ||
881 | } | 942 | } |
882 | 943 | ||
883 | .yoho-header.boys { | 944 | .yoho-header.boys { |
@@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
118 | margin: 0 auto 30px; | 118 | margin: 0 auto 30px; |
119 | height: auto; | 119 | height: auto; |
120 | overflow: hidden; | 120 | overflow: hidden; |
121 | - padding: 0 15px; | 121 | + padding: 0 20px; |
122 | box-sizing: border-box; | 122 | box-sizing: border-box; |
123 | 123 | ||
124 | li { | 124 | li { |
@@ -144,11 +144,11 @@ | @@ -144,11 +144,11 @@ | ||
144 | } | 144 | } |
145 | 145 | ||
146 | .new-guide a { | 146 | .new-guide a { |
147 | - margin-left: 74px; | 147 | + margin-left: 72.4px; |
148 | } | 148 | } |
149 | 149 | ||
150 | .self-service { | 150 | .self-service { |
151 | - padding: 0 20px; | 151 | + padding: 0 20px; |
152 | 152 | ||
153 | a { | 153 | a { |
154 | margin-left: 158px; | 154 | margin-left: 158px; |
-
Please register or login to post a comment