Showing
1 changed file
with
18 additions
and
5 deletions
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | 6 | ||
7 | var $ = require('jquery'), | 7 | var $ = require('jquery'), |
8 | lazyLoad = require('yoho.lazyload'), | 8 | lazyLoad = require('yoho.lazyload'), |
9 | + Hammer = require('yoho.hammer'), | ||
9 | tip = require('../plugin/tip'), | 10 | tip = require('../plugin/tip'), |
10 | loading = require('../plugin/loading'), | 11 | loading = require('../plugin/loading'), |
11 | chosePanel = require('./chose-panel'); | 12 | chosePanel = require('./chose-panel'); |
@@ -35,10 +36,22 @@ function getProductInfo(skn, promotionId) { | @@ -35,10 +36,22 @@ function getProductInfo(skn, promotionId) { | ||
35 | }); | 36 | }); |
36 | } | 37 | } |
37 | 38 | ||
38 | -$page.on('touchend', '.chose', function() { | ||
39 | - var $this = $(this), | ||
40 | - id = $this.closest('.gift-advance-good').data('id'), | ||
41 | - promotionId = $this.closest('.advance-block').data('promotion-id'); | 39 | +$page.find('.chose').each(function(i, elem) { |
40 | + var choseHammer = new Hammer(elem); | ||
42 | 41 | ||
43 | - getProductInfo(id, promotionId); | 42 | + choseHammer.on('tap', function(e) { |
43 | + var $this = $(e.target), | ||
44 | + id = $this.closest('.gift-advance-good').data('id'), | ||
45 | + promotionId = $this.closest('.advance-block').data('promotion-id'); | ||
46 | + | ||
47 | + getProductInfo(id, promotionId); | ||
48 | + }); | ||
44 | }); | 49 | }); |
50 | + | ||
51 | +// $page.on('touchend', '.chose', function() { | ||
52 | +// var $this = $(this), | ||
53 | +// id = $this.closest('.gift-advance-good').data('id'), | ||
54 | +// promotionId = $this.closest('.advance-block').data('promotion-id'); | ||
55 | +// | ||
56 | +// getProductInfo(id, promotionId); | ||
57 | +// }); |
-
Please register or login to post a comment