Browse Source

优惠券非新用户报错

master
Lemon 5 years ago
parent
commit
d79bc9d106
  1. 8
      app/Controller/v3/CouponController.php

8
app/Controller/v3/CouponController.php

@ -90,7 +90,13 @@ class CouponController extends BaseController
->whereIn('state',OrderState::REFUND)
->exists();
if($newUserCheck){
throw new ErrorCodeException(ErrorCode::COUPON_IS_NOT_NEW_USER,'',$userId);
return $this->result(
ErrorCode::COUPON_IS_NOT_NEW_USER,
[
'text'=>'关注懒族菜市微信公众号,更多精彩活动一手掌握!'
],
'不是新用户无法领券'
);
}
$res = $this->couponRecService->getAvailableList($userId,$receiveType);
return $this->success($res);

Loading…
Cancel
Save