Authored by Lynnic

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

Conflicts:
	template/m.yohobuy.com/partials/product/feedback-tab.phtml
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 Nov 23 16:04:11 2015 5 +Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
19 bbox="-0.75 -224 3943 833" 19 bbox="-0.75 -224 3943 833"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E63E" 22 + unicode-range="U+0078-E63F"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5 @@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5
252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4 252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4
253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5 253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5
254 q-6 -21 -34 -21z" /> 254 q-6 -21 -34 -21z" />
  255 + <glyph glyph-name="uniE63F" unicode="&#xe63f;" horiz-adv-x="1025"
  256 +d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 117 -192 282q-5 30 -5 60q0 122 68.5 223t186 158.5t257.5 57.5q104 0 199 -34t163.5 -92.5t109 -140t40.5 -172.5q0 -167 -126 -290q-124 -121 -312 -144q-37 -5 -74 -5zM512 763
  257 +q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
  258 +q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
  259 +t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
255 </font> 260 </font>
256 </defs></svg> 261 </defs></svg>
No preview for this file type
No preview for this file type
@@ -114,7 +114,7 @@ $page.on('touchstart', '.del-icon', function() { @@ -114,7 +114,7 @@ $page.on('touchstart', '.del-icon', function() {
114 }); 114 });
115 setTimeout(function() { 115 setTimeout(function() {
116 window.history.go(0); 116 window.history.go(0);
117 - }, 1000); 117 + }, 2500);
118 } 118 }
119 }, 119 },
120 complete: function() { 120 complete: function() {
1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - Hammer = require('yoho.hammer'),  
3 Swiper = require('yoho.iswiper'), 2 Swiper = require('yoho.iswiper'),
4 lazyLoad = require('yoho.lazyload'), 3 lazyLoad = require('yoho.lazyload'),
5 loading = require('../../plugin/loading'); 4 loading = require('../../plugin/loading');
6 5
7 var page = 1, 6 var page = 1,
8 winH, 7 winH,
9 - hotnav,  
10 listTop, 8 listTop,
11 navSwiper, 9 navSwiper,
12 notab = 0, 10 notab = 0,
@@ -15,42 +13,6 @@ var page = 1, @@ -15,42 +13,6 @@ var page = 1,
15 hotrankNav, 13 hotrankNav,
16 noResult = '<p class="no-result">未找到相关搜索结果</p>'; 14 noResult = '<p class="no-result">未找到相关搜索结果</p>';
17 15
18 -// var renderRank = {  
19 -// errMsg: '<p class="no-result">未找到相关搜索结果</p>',  
20 -// navSelector: '.goods-nav',  
21 -// rankSelector: '#hotRank',  
22 -// navHTML: null,  
23 -// data: null,  
24 -// inited: 0,  
25 -// setData: function(data) {  
26 -// this.data = data;  
27 -// },  
28 -// showDataEmptyMsg: function() {  
29 -// $(this.rankSelector).append(this.errMsg);  
30 -// },  
31 -// isDataEmpty: function() {  
32 -// if (this.data.indexOf('>') === -1) {  
33 -// return true;  
34 -// } else {  
35 -// return false;  
36 -// }  
37 -// },  
38 -// appendData: function() {  
39 -// if (!this.inited) {  
40 -// this.inited = 1;  
41 -// }  
42 -// $(this.rankSelector).append(this.data);  
43 -// },  
44 -// render: function(data) {  
45 -// this.setData(data);  
46 -// if (!this.isDataEmpty()) {  
47 -// this.appendData();  
48 -// } else {  
49 -// this.showDataEmptyMsg();  
50 -// }  
51 -// }  
52 -  
53 -// };  
54 16
55 function hotrank(page, sort, tabId, notab) { 17 function hotrank(page, sort, tabId, notab) {
56 loading.showLoadingMask(); 18 loading.showLoadingMask();
@@ -64,27 +26,6 @@ function hotrank(page, sort, tabId, notab) { @@ -64,27 +26,6 @@ function hotrank(page, sort, tabId, notab) {
64 notab: notab 26 notab: notab
65 }, 27 },
66 success: function(data) { 28 success: function(data) {
67 -  
68 - // if (page === 1) {  
69 - // $('.no-result').remove();  
70 - // $('.rank-main').remove();  
71 - // }  
72 -  
73 - // if (notab === 1) {  
74 - // if (data === ' ' && $('.rank-main').length < 1) {  
75 - // var hotrankNav = $('.goods-nav').prop("outerHTML");  
76 -  
77 - // $('#hotRank').html(hotrankNav + noResult);  
78 - // } else {  
79 - // $('#hotRank').append(data);  
80 - // }  
81 - // } else {  
82 - // if (data === ' ') {  
83 - // $('#hotRank').html(noResult);  
84 - // } else {  
85 - // $('#hotRank').append(data);  
86 - // }  
87 - // }  
88 if (data === ' ') { 29 if (data === ' ') {
89 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) { 30 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) {
90 $('#hotRank').html(noResult); 31 $('#hotRank').html(noResult);
@@ -100,11 +41,6 @@ function hotrank(page, sort, tabId, notab) { @@ -100,11 +41,6 @@ function hotrank(page, sort, tabId, notab) {
100 $('.rank-main').remove(); 41 $('.rank-main').remove();
101 $('#hotRank').append(data); 42 $('#hotRank').append(data);
102 } 43 }
103 -  
104 - // renderRank.render(data);  
105 -  
106 -  
107 -  
108 lazyLoad($('img.lazy')); 44 lazyLoad($('img.lazy'));
109 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); 45 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
110 winH = $(window).height(); 46 winH = $(window).height();
@@ -136,28 +72,35 @@ function scrollHandler() { @@ -136,28 +72,35 @@ function scrollHandler() {
136 hotrank(page, sort, id, notab); 72 hotrank(page, sort, id, notab);
137 } 73 }
138 74
139 -//srcoll to load more  
140 $(window).scroll(function() { 75 $(window).scroll(function() {
141 window.requestAnimationFrame(scrollHandler); 76 window.requestAnimationFrame(scrollHandler);
142 }); 77 });
143 78
144 hotrank(page, sort, id, notab); 79 hotrank(page, sort, id, notab);
145 -hotnav = new Hammer(document.getElementById('hotRank'));  
146 -hotnav.on('tap', function(e) { 80 +$('#hotRank').on('touchend touchcancel', function(e) {
147 var ev = ev || window.event; 81 var ev = ev || window.event;
148 var target = ev.target || ev.srcElement; 82 var target = ev.target || ev.srcElement;
149 83
150 if (target.nodeName.toLowerCase() === 'span') { 84 if (target.nodeName.toLowerCase() === 'span') {
151 - $('.s-goods-nav .nav-item').removeClass('active');  
152 target.parentNode.className = 'active ' + target.parentNode.className; 85 target.parentNode.className = 'active ' + target.parentNode.className;
153 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : ''; 86 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : '';
154 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : ''; 87 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : '';
155 page = 1; 88 page = 1;
156 -  
157 - // notab = renderRank.inited;  
158 notab = 1; 89 notab = 1;
159 -  
160 -  
161 hotrank(page, sort, id, notab); 90 hotrank(page, sort, id, notab);
162 } 91 }
163 }); 92 });
  93 +$('#hotRank').bind('contextmenu', function(e) {
  94 + return false;
  95 +});
  96 +$('#hotRank').on('touchstart', function(e) {
  97 + var ev = ev || window.event;
  98 + var target = ev.target || ev.srcElement;
  99 +
  100 + if (target.nodeName.toLowerCase() === 'span') {
  101 + target.parentNode.className = 'active ' + target.parentNode.className;
  102 + }
  103 +}).on('touchend touchcancel', function() {
  104 + $('.s-goods-nav .nav-item').removeClass('active');
  105 +});
  106 +
@@ -131,13 +131,14 @@ @@ -131,13 +131,14 @@
131 overflow: hidden; 131 overflow: hidden;
132 132
133 li { 133 li {
134 - margin: 0 0 0 (50rem / $pxConvertRem); 134 + margin: 0 (10rem / $pxConvertRem);
  135 + padding:0 (15rem / $pxConvertRem);
135 width: auto; 136 width: auto;
136 - height: 95%; 137 + height: 100%;
137 color: #999; 138 color: #999;
138 &.active{ 139 &.active{
139 color: #000; 140 color: #000;
140 - border-bottom:2px solid #000; 141 + background-color:#e0e0e0;
141 } 142 }
142 a { 143 a {
143 padding: 0; 144 padding: 0;
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <ul class="swiper-wrapper clearfix"> 3 <ul class="swiper-wrapper clearfix">
4 {{# tabs}} 4 {{# tabs}}
5 {{# title}} 5 {{# title}}
6 - <li class="swiper-slide nav-item {{#if @first}} active{{/if}}"> 6 + <li class="swiper-slide nav-item">
7 <span data-sort="{{ params}}" data-id="{{ id}}" >{{ name}}</span> 7 <span data-sort="{{ params}}" data-id="{{ id}}" >{{ name}}</span>
8 </li> 8 </li>
9 {{/ title}} 9 {{/ title}}
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 </div> 44 </div>
45 45
46 <div class="answer"> 46 <div class="answer">
47 - <span class="iconfont comment">&#xe63d;</span> 47 + <span class="iconfont">&#xe63f;</span>
48 <p>{{answer}}</p> 48 <p>{{answer}}</p>
49 </div> 49 </div>
50 {{/ consults}} 50 {{/ consults}}
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 </div> 56 </div>
57 {{else}} 57 {{else}}
58 <div class="consult-content-main content-main no-item"> 58 <div class="consult-content-main content-main no-item">
59 - <span class="iconfont comment">&#xe63d;</span>暂无咨询 59 + <span class="iconfont">&#xe63f;</span>暂无咨询
60 </div> 60 </div>
61 <div class="consult-content-footer"> 61 <div class="consult-content-footer">
62 <a href="{{link}}"> 62 <a href="{{link}}">