...
|
...
|
@@ -157,6 +157,18 @@ function modalInit() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
function getPersenalCouponHtml(data) {
|
|
|
let html = `<div class="persenal-coupon">
|
|
|
<span class="coupon-amount">${data.amount || 0}</span>
|
|
|
<span class="coupon-limit">满¥${data.useLimit || 0}使用</span>
|
|
|
<span class="coupon-name">${data.limitName}</span>
|
|
|
<span class="coupon-type">${data.limitTypeName}</span>
|
|
|
<span class="coupon-time">有效期:${data.startTime} - ${data.endTime}</span>
|
|
|
</div>`;
|
|
|
|
|
|
return html;
|
|
|
}
|
|
|
|
|
|
function persenalCouponInit() {
|
|
|
let data = {
|
|
|
activity_id: $('.feature-page').data('id')
|
...
|
...
|
@@ -177,6 +189,7 @@ function persenalCouponInit() { |
|
|
success: function(res) {
|
|
|
if (res.code === 200 && res.data && res.data.couponId && res.data.personCouponId) {
|
|
|
$this.attr('data-token', `${res.data.couponId}:${res.data.personCouponId}`);
|
|
|
$this.html(getPersenalCouponHtml(res.data));
|
|
|
$this.closest('.floor').show();
|
|
|
}
|
|
|
}
|
...
|
...
|
|