// 删除优惠券
function removeCoupon(e, coupon_id) {
var msg = "您真的确定要删除吗?\n\n请确认!";
if (confirm(msg) == false){
return false;
}
var request = $.ajax({
url: URL + '/removeCoupon',
method: 'POST',
data: {coupon_id: coupon_id},
dataType: 'json'
});
request.done(function (res) {
if (res.sign == 1) {
var $v = $(e);
$v.parent().parent().remove();
} else {
alert(res.msg);
}
});
request.fail(function (jqXHR, textStatus) {
alert('Request failed: ' + '网络不稳定,请稍后重试...');
})
}
js
ajax请求
最新推荐文章于 2022-10-29 12:43:10 发布