|
@@ -158,7 +158,13 @@ function modalInit() { |
|
@@ -158,7 +158,13 @@ function modalInit() { |
158
|
}
|
158
|
}
|
159
|
|
159
|
|
160
|
function persenalCouponInit() {
|
160
|
function persenalCouponInit() {
|
161
|
- let activityId = $('.feature-page').data('id');
|
161
|
+ let data = {
|
|
|
162
|
+ activity_id: $('.feature-page').data('id')
|
|
|
163
|
+ };
|
|
|
164
|
+
|
|
|
165
|
+ if (qs.uid) {
|
|
|
166
|
+ data.uid = qs.uid;
|
|
|
167
|
+ }
|
162
|
|
168
|
|
163
|
$('.yoho-conpon').each(function() {
|
169
|
$('.yoho-conpon').each(function() {
|
164
|
let $this = $(this);
|
170
|
let $this = $(this);
|
|
@@ -167,10 +173,7 @@ function persenalCouponInit() { |
|
@@ -167,10 +173,7 @@ function persenalCouponInit() { |
167
|
$.ajax({
|
173
|
$.ajax({
|
168
|
url: '//m.yohobuy.com/activity/individuation/coupon',
|
174
|
url: '//m.yohobuy.com/activity/individuation/coupon',
|
169
|
dataType: 'jsonp',
|
175
|
dataType: 'jsonp',
|
170
|
- data: {
|
|
|
171
|
- uid: qs.uid || 0,
|
|
|
172
|
- activity_id: activityId
|
|
|
173
|
- },
|
176
|
+ data: data,
|
174
|
success: function(res) {
|
177
|
success: function(res) {
|
175
|
if (res.code === 200 && res.data && res.data.couponId && res.data.personCouponId) {
|
178
|
if (res.code === 200 && res.data && res.data.couponId && res.data.personCouponId) {
|
176
|
$this.attr('data-token', `${res.data.couponId}:${res.data.personCouponId}`);
|
179
|
$this.attr('data-token', `${res.data.couponId}:${res.data.personCouponId}`);
|