|
@@ -149,20 +149,21 @@ class StoreCouponUserServices extends BaseServices
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ @file_put_contents("quanju.txt", $hasRepeat."-是否是复购商品\r\n", 8);
|
|
|
|
|
|
|
|
foreach ($userCoupons as $coupon) {
|
|
foreach ($userCoupons as $coupon) {
|
|
|
$couponType = (int)$coupon['applicable_type'];
|
|
$couponType = (int)$coupon['applicable_type'];
|
|
|
|
|
|
|
|
// is_repeat 为 1:只显示 type=2 的优惠券
|
|
// is_repeat 为 1:只显示 type=2 的优惠券
|
|
|
- if ($hasRepeat && $couponType !== 2) {
|
|
|
|
|
|
|
+ if ($hasRepeat && $couponType !== 3) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
// is_free 为 1:只显示 type=3 的优惠券
|
|
// is_free 为 1:只显示 type=3 的优惠券
|
|
|
- if ($hasFree && $couponType !== 3) {
|
|
|
|
|
|
|
+ if ($hasFree && $couponType !== 4) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
// is_repeat 和 is_free 都不为 1:隐藏 type=2 和 type=3 的优惠券
|
|
// is_repeat 和 is_free 都不为 1:隐藏 type=2 和 type=3 的优惠券
|
|
|
- if (!$hasRepeat && !$hasFree && ($couponType === 2 || $couponType === 3)) {
|
|
|
|
|
|
|
+ if (!$hasRepeat && !$hasFree && ($couponType === 3 || $couponType === 4)) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
|