Authored by 毕凯

加价购选择太灵敏

... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
Hammer = require('yoho.hammer'),
tip = require('../plugin/tip'),
loading = require('../plugin/loading'),
chosePanel = require('./chose-panel');
... ... @@ -35,10 +36,22 @@ function getProductInfo(skn, promotionId) {
});
}
$page.on('touchend', '.chose', function() {
var $this = $(this),
id = $this.closest('.gift-advance-good').data('id'),
promotionId = $this.closest('.advance-block').data('promotion-id');
$page.find('.chose').each(function(i, elem) {
var choseHammer = new Hammer(elem);
getProductInfo(id, promotionId);
choseHammer.on('tap', function(e) {
var $this = $(e.target),
id = $this.closest('.gift-advance-good').data('id'),
promotionId = $this.closest('.advance-block').data('promotion-id');
getProductInfo(id, promotionId);
});
});
// $page.on('touchend', '.chose', function() {
// var $this = $(this),
// id = $this.closest('.gift-advance-good').data('id'),
// promotionId = $this.closest('.advance-block').data('promotion-id');
//
// getProductInfo(id, promotionId);
// });
... ...