|
|
|
@ -92,8 +92,8 @@ class CouponController extends BaseController |
|
|
|
if($newUserCheck){ |
|
|
|
return $this->success( |
|
|
|
[ |
|
|
|
'error' => true, |
|
|
|
'error_text' => '不是新用户无法领券', |
|
|
|
'status' => 'error', |
|
|
|
'message' => '不是新用户无法领券', |
|
|
|
'text'=>'关注懒族菜市微信公众号,更多精彩活动一手掌握!' |
|
|
|
] |
|
|
|
); |
|
|
|
@ -111,6 +111,10 @@ class CouponController extends BaseController |
|
|
|
$receiveType = $this->request->input("receive_type", 0); |
|
|
|
$ids = $this->request->input("ids", ''); |
|
|
|
$res = $this->couponRecService->receive($userId,$receiveType,$ids); |
|
|
|
return $this->success($res); |
|
|
|
if(!empty($res['success'])){ |
|
|
|
return $this->success(['text' => '红包领取成功,请到“我的-红包”中查看']); |
|
|
|
}else{ |
|
|
|
throw new ErrorCodeException(ErrorCode::COUPON_RECEIVE_FAILURE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |