Authored by 郝肖肖

去除小数点,店铺优惠券

... ... @@ -6,9 +6,9 @@ var $ = require('jquery'),
var isCouponClick = true,
appVersion = $('input[name="app_version"]').val();
$(".coupon-content .receive-btn").on('touchstart', function(e) {
$(".coupon-content .receive-btn").closest('.swiper-slide').on('touchstart', function(e) {
var that = this,
code = $(this).closest('.swiper-slide').data('id') || '';
code = $(this).data('id') || '';
if (isCouponClick === false) {
return false;
... ... @@ -32,7 +32,7 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) {
if (data.code === 200) {
tip.show('领取成功');
$(that).addClass('padding-20').html('已领取');
$(that).find('.receive-btn').addClass('padding-20').html('已领取');
$(that).unbind('touchstart');//移除绑定事件
return true;
} else if (data.code === 4401) {
... ...
... ... @@ -514,7 +514,7 @@ class ListModel
'id' => Encryption::encrypt($value['coupon_id']),
'name' => $value['coupon_name'],
'pic' => $value['coupon_pic'],
'money' => $value['money'],
'money' => intval($value['money']),
'status' => $value['status'] === 1
);
}
... ...