|
@@ -79,7 +79,7 @@ class UniversityCourse extends Api
|
|
|
if (empty($params['phone'])) {
|
|
|
return $this->error('报名信息手机号不能为空');
|
|
|
}
|
|
|
- if (empty($params['course_id'])) {
|
|
|
+ if (empty($params['coupon_id'])) {
|
|
|
return $this->error('请选择抵扣券');
|
|
|
}
|
|
|
$user_id = $this->auth->id;
|
|
@@ -100,7 +100,7 @@ class UniversityCourse extends Api
|
|
|
return $this->error('您已报过名了');
|
|
|
}
|
|
|
|
|
|
- $coupon = Db::name('vip_coupon_user')->where('user_id',$user_id)->where('id',$params['course_id'])->find();
|
|
|
+ $coupon = Db::name('vip_coupon_user')->where('user_id',$user_id)->where('id',$params['coupon_id'])->find();
|
|
|
if (!$coupon || $coupon['status'] != 1){
|
|
|
return $this->error('优惠券不存在或已使用');
|
|
|
}
|