Authored by hf

Merge remote-tracking branch 'origin/hotfix/xieweiguang'

@@ -4,8 +4,7 @@ @@ -4,8 +4,7 @@
4 * @date: 2015/10/14 4 * @date: 2015/10/14
5 */ 5 */
6 6
7 -var $ = require('jquery'),  
8 - Hammer = require('yoho.hammer'); 7 +var $ = require('jquery');
9 8
10 var $nav = $('.category-nav'), 9 var $nav = $('.category-nav'),
11 $categoryContainer = $('.category-container'), 10 $categoryContainer = $('.category-container'),
@@ -15,7 +14,6 @@ var $nav = $('.category-nav'), @@ -15,7 +14,6 @@ var $nav = $('.category-nav'),
15 14
16 var $curContent = $contents.not('.hide'); 15 var $curContent = $contents.not('.hide');
17 16
18 -var navHammer;  
19 17
20 //初始化container高度 18 //初始化container高度
21 (function() { 19 (function() {
@@ -39,8 +37,7 @@ $('.category-container').bind('contextmenu', function(e) { @@ -39,8 +37,7 @@ $('.category-container').bind('contextmenu', function(e) {
39 return false; 37 return false;
40 }); 38 });
41 39
42 -navHammer = new Hammer($nav[0]);  
43 -navHammer.on('tap pressup', function(e) { 40 +$nav.on('touchend touchcancel', function(e) {
44 var $this = $(e.target).closest('li'), 41 var $this = $(e.target).closest('li'),
45 index = $this.index(); 42 index = $this.index();
46 43
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 */ 5 */
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 - Hammer = require('yoho.hammer'),  
9 Swiper = require('yoho.iswiper'); 8 Swiper = require('yoho.iswiper');
10 9
11 var info = require('./info'), 10 var info = require('./info'),
@@ -25,7 +24,7 @@ var $infoList = $('#info-list'), @@ -25,7 +24,7 @@ var $infoList = $('#info-list'),
25 24
26 var state = {}; 25 var state = {};
27 26
28 -var mySwiper, navHammer; 27 +var mySwiper;
29 28
30 if ($loadMoreInfo.length > 0) { 29 if ($loadMoreInfo.length > 0) {
31 $loading = $loadMoreInfo.children('.loading'); 30 $loading = $loadMoreInfo.children('.loading');
@@ -59,8 +58,7 @@ info.initInfosEvt($infoList); @@ -59,8 +58,7 @@ info.initInfosEvt($infoList);
59 $nav.bind('contextmenu', function(e) { 58 $nav.bind('contextmenu', function(e) {
60 return false; 59 return false;
61 }); 60 });
62 -navHammer = new Hammer($nav[0]);  
63 -navHammer.on('tap pressup', function(e) { 61 +$nav.on('touchend touchcancel', function(e) {
64 62
65 var $this = $(e.target).closest('.guang-nav-item'), 63 var $this = $(e.target).closest('.guang-nav-item'),
66 $content, 64 $content,
@@ -5,14 +5,13 @@ @@ -5,14 +5,13 @@
5 */ 5 */
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 - Hammer = require('yoho.hammer'),  
9 lazyLoad = require('yoho.lazyload'), 8 lazyLoad = require('yoho.lazyload'),
10 Swiper = require('yoho.iswiper'); 9 Swiper = require('yoho.iswiper');
11 10
12 var $navs = $('#nav-tab > li'), 11 var $navs = $('#nav-tab > li'),
13 $contents = $('#ps-content > .content'); 12 $contents = $('#ps-content > .content');
14 13
15 -var mySwiper, navHammer; 14 +var mySwiper;
16 15
17 lazyLoad($('img.lazy')); 16 lazyLoad($('img.lazy'));
18 17
@@ -23,8 +22,7 @@ mySwiper = new Swiper('.swiper-container', { @@ -23,8 +22,7 @@ mySwiper = new Swiper('.swiper-container', {
23 $('#nav-tab').bind('contextmenu', function(e) { 22 $('#nav-tab').bind('contextmenu', function(e) {
24 return false; 23 return false;
25 }); 24 });
26 -navHammer = new Hammer(document.getElementById('nav-tab'));  
27 -navHammer.on('tap pressup', function(e) { 25 +$('#nav-tab').on('touchend touchcancel', function(e) {
28 var $this = $(e.target).closest('li'); 26 var $this = $(e.target).closest('li');
29 27
30 if ($this.hasClass('focus')) { 28 if ($this.hasClass('focus')) {
@@ -70,7 +70,6 @@ var $listNav = $('#list-nav'), @@ -70,7 +70,6 @@ var $listNav = $('#list-nav'),
70 }, 70 },
71 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 71 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项
72 searching, 72 searching,
73 - navHammer,  
74 btnIntroHammer, 73 btnIntroHammer,
75 introHammer, 74 introHammer,
76 brandColHammer; 75 brandColHammer;
@@ -285,8 +284,8 @@ writeSearch.bindWirteLocal($('#search-form')); @@ -285,8 +284,8 @@ writeSearch.bindWirteLocal($('#search-form'));
285 $listNav.bind('contextmenu', function(e) { 284 $listNav.bind('contextmenu', function(e) {
286 return false; 285 return false;
287 }); 286 });
288 -navHammer = new Hammer($listNav[0]);  
289 -navHammer.on('tap pressup', function(e) { 287 +
  288 +$listNav.on('touchend touchcancel', function(e) {
290 var $this = $(e.target).closest('li'), 289 var $this = $(e.target).closest('li'),
291 nav, 290 nav,
292 navType, 291 navType,
@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 Swiper = require('yoho.iswiper'), 8 Swiper = require('yoho.iswiper'),
9 - Hammer = require('yoho.hammer'),  
10 lazyLoad = require('yoho.lazyload'); 9 lazyLoad = require('yoho.lazyload');
11 10
12 var swiper; 11 var swiper;
@@ -62,7 +61,6 @@ var $listNav = $('#list-nav'), @@ -62,7 +61,6 @@ var $listNav = $('#list-nav'),
62 } 61 }
63 }, 62 },
64 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 63 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项
65 - navHammer,  
66 searching; 64 searching;
67 65
68 require('../suspend-cart'); //悬浮购物车 66 require('../suspend-cart'); //悬浮购物车
@@ -266,8 +264,8 @@ lazyLoad($('.lazy')); @@ -266,8 +264,8 @@ lazyLoad($('.lazy'));
266 $listNav.bind('contextmenu', function(e) { 264 $listNav.bind('contextmenu', function(e) {
267 return false; 265 return false;
268 }); 266 });
269 -navHammer = new Hammer($listNav[0]);  
270 -navHammer.on('tap pressup', function(e) { 267 +
  268 +$listNav.on('touchend touchcancel', function(e) {
271 var $this = $(e.target).closest('li'), 269 var $this = $(e.target).closest('li'),
272 nav, 270 nav,
273 navType, 271 navType,
@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 Swiper = require('yoho.iswiper'), 8 Swiper = require('yoho.iswiper'),
9 - Hammer = require('yoho.hammer'),  
10 lazyLoad = require('yoho.lazyload'); 9 lazyLoad = require('yoho.lazyload');
11 10
12 var swiper, 11 var swiper,
@@ -72,7 +71,6 @@ var $listNav = $('#list-nav'), @@ -72,7 +71,6 @@ var $listNav = $('#list-nav'),
72 } 71 }
73 }, 72 },
74 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 73 $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项
75 - navHammer,  
76 searching; 74 searching;
77 75
78 require('../suspend-cart'); //悬浮购物车 76 require('../suspend-cart'); //悬浮购物车
@@ -295,8 +293,8 @@ $listNav.bind('contextmenu', function(e) { @@ -295,8 +293,8 @@ $listNav.bind('contextmenu', function(e) {
295 //3.筛选无active时点击展开筛选面板 293 //3.筛选无active时点击展开筛选面板
296 //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 294 //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
297 //5.当前active为筛选并且点击其他项时,隐藏筛选面板 295 //5.当前active为筛选并且点击其他项时,隐藏筛选面板
298 -navHammer = new Hammer($listNav[0]);  
299 -navHammer.on('tap pressup', function(e) { 296 +// navHammer = new Hammer($listNav[0]);
  297 +$listNav.on('touchend touchcancel', function(e) {
300 var $this = $(e.target).closest('li'), 298 var $this = $(e.target).closest('li'),
301 nav, 299 nav,
302 navType, 300 navType,
@@ -373,7 +371,7 @@ navHammer.on('tap pressup', function(e) { @@ -373,7 +371,7 @@ navHammer.on('tap pressup', function(e) {
373 search(); 371 search();
374 } 372 }
375 } 373 }
376 - e.srcEvent.stopPropagation(); 374 + e.stopPropagation();
377 }); 375 });
378 376
379 $(window).scroll(function() { 377 $(window).scroll(function() {