Showing
1 changed file
with
15 additions
and
2 deletions
@@ -44,8 +44,21 @@ seckillObj = { | @@ -44,8 +44,21 @@ seckillObj = { | ||
44 | let focus = $el.$navUl.find('>li.focus'); | 44 | let focus = $el.$navUl.find('>li.focus'); |
45 | 45 | ||
46 | self.$productList = $('.product-list'); | 46 | self.$productList = $('.product-list'); |
47 | - $el.$navUl.find('>li').click(function(event) { | ||
48 | - self.selectTime(event.currentTarget); | 47 | + |
48 | + // 在app webview中click捕获不到translate样式后的新位置 | ||
49 | + let $navLis = $el.$navUl.find('>li'); | ||
50 | + | ||
51 | + $navLis.on('touchmove', function() { | ||
52 | + self.navMove = true; | ||
53 | + }); | ||
54 | + $navLis.on('touchend', function(event) { | ||
55 | + if (self.navMove) { | ||
56 | + self.navMove = false; | ||
57 | + return; | ||
58 | + } | ||
59 | + setTimeout(() => { | ||
60 | + self.selectTime(event.currentTarget); | ||
61 | + }, 200); | ||
49 | }); | 62 | }); |
50 | 63 | ||
51 | $(window).resize(function() { | 64 | $(window).resize(function() { |
-
Please register or login to post a comment