mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 20:06:09 +08:00
24 lines
731 B
JavaScript
24 lines
731 B
JavaScript
layui.use(['jquery', 'layer'], function () {
|
|
|
|
var $ = layui.jquery;
|
|
var layer = layui.layer;
|
|
|
|
$('.btn-redeem').on('click', function () {
|
|
var url = $(this).data('url');
|
|
var data = {gift_id: $(this).data('id')};
|
|
layer.confirm('兑换不支持退换,确定要兑换该物品吗?', function () {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: url,
|
|
data: data,
|
|
success: function (res) {
|
|
layer.msg(res.msg, {icon: 1});
|
|
setTimeout(function () {
|
|
window.location.href = '/uc/point/redeems';
|
|
}, 3000);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
}); |