...
|
...
|
@@ -188,7 +188,17 @@ function persenalCouponInit() { |
|
|
data: data,
|
|
|
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}`);
|
|
|
if (res.data.couponCode) {
|
|
|
// 领取过
|
|
|
const prodList = `http://list.m.yohobuy.com/?coupon_code=${res.data.couponCode}&coupon_id=${res.data.couponId}&intro_text=${res.data.couponName}&title=${res.data.limitTypeName}&openby:yohobuy={"action":"go.couponProductList","params":{"coupon_code":"${res.data.couponCode}","coupon_id":"${res.data.couponId}","title":"${res.data.limitTypeName}","coupon_title":"${res.data.couponName}"}}`; // eslint-disable-line
|
|
|
|
|
|
$this.attr('href', prodList);
|
|
|
$this.removeClass('yoho-conpon');
|
|
|
} else {
|
|
|
// 未领取过
|
|
|
$this.attr('data-token', `${res.data.couponId}:${res.data.personCouponId}`);
|
|
|
}
|
|
|
|
|
|
$this.html(getPersenalCouponHtml(res.data));
|
|
|
$this.closest('.floor').show();
|
|
|
}
|
...
|
...
|
|