Browse Source

预约与候补

lizhen_gitee 8 months ago
parent
commit
865b85f3e3
1 changed files with 4 additions and 8 deletions
  1. 4 8
      application/api/controller/Lesson.php

+ 4 - 8
application/api/controller/Lesson.php

@@ -438,10 +438,6 @@ class Lesson extends Api
         if($num_remain >= $number){
         if($num_remain >= $number){
             $this->success('success',1);
             $this->success('success',1);
         }
         }
-        //只要还有预约位置,就不能候补
-        if($num_remain > 0){
-            $this->error('可预约名额不足');
-        }
 
 
         //剩余候补数量
         //剩余候补数量
         $wait_remain = 0;
         $wait_remain = 0;
@@ -458,8 +454,8 @@ class Lesson extends Api
             $this->success('success',2);
             $this->success('success',2);
         }
         }
 
 
-        //候补也不够了
-        $this->error('可候补名额不足');
+        //两者都不够了
+        $this->error('可预约名额不足');
 
 
     }
     }
     //课时申请报名
     //课时申请报名
@@ -521,9 +517,9 @@ class Lesson extends Api
             }
             }
             //可以继续
             //可以继续
         }else{
         }else{
-            if($num_remain > 0){
+            /*if($num_remain > 0){
                 $this->error(__('预约还有名额,不能候补'));
                 $this->error(__('预约还有名额,不能候补'));
-            }
+            }*/
             //候补人数不能超限
             //候补人数不能超限
             if($wait_remain < $number){
             if($wait_remain < $number){
                 $this->error(__('候补名额只剩N名',['number'=>$wait_remain]));
                 $this->error(__('候补名额只剩N名',['number'=>$wait_remain]));