Authored by 郭成尧

modified-code

... ... @@ -5,7 +5,6 @@
*/
var $ = require('yoho-jquery'),
Hammer = require('yoho-hammer'),
ellipsis = require('yoho-mlellipsis'),
loading = require('../plugin/loading'),
tip = require('../plugin/tip'),
... ... @@ -125,11 +124,8 @@ function getCouponHandle(allCoupons) {
// 渲染可用的优惠券
$couponList.append(conponTmpl({
coupons: coupons
})).find('.employ-main').each(function(i, elem) {
var employHammer = new Hammer(elem);
employHammer.on('tap', function() {
var couponCode = $(elem).data('coupon-code');
})).find('.employ-main').on('touchstart', function() {
var couponCode = $(this).data('coupon-code');
$.ajax({
method: 'POST',
... ... @@ -154,7 +150,6 @@ function getCouponHandle(allCoupons) {
tip.show('网络错误');
});
});
});
if (notAvailableCoupons.length) {
$('.not-avaliable-coupon-line').show();
... ...