Browse Source

第一次打视频

lizhen_gitee 9 months ago
parent
commit
7ef525fea6
1 changed files with 13 additions and 3 deletions
  1. 13 3
      application/api/controller/doctor/Wenzhen.php

+ 13 - 3
application/api/controller/doctor/Wenzhen.php

@@ -322,11 +322,21 @@ class Wenzhen extends Apic
             $this->error('不存在的订单');
         }
 
-        if($wenzhen_order['ordertype'] != 2 || $wenzhen_order['status'] != 20){
-            $this->error('已接诊的视频订单才能拨打视频');
+        if($wenzhen_order['ordertype'] != 2){
+            $this->error('视频订单才能拨打视频');
         }
 
-        if($wenzhen_order['book_time'] < time() - 300){
+        if($wenzhen_order['status'] == 30){
+            $this->error('订单已结束');
+        }
+        if($wenzhen_order['status'] == 25){
+            $this->success();
+        }
+        if($wenzhen_order['status'] != 20){
+            $this->error('订单未接诊');
+        }
+
+        if($wenzhen_order['book_time'] > time()){
             $this->error('未到预约时间');
         }