|
@@ -308,6 +308,37 @@ class Wenzhen extends Apic
|
|
|
$this->success('接珍成功');
|
|
|
}
|
|
|
|
|
|
+ //第一次拨打视频之前
|
|
|
+ public function before_first_video(){
|
|
|
+
|
|
|
+ //订单详情
|
|
|
+ $order_id = input('order_id',0);
|
|
|
+ $wenzhen_order = Db::name('wenzhen_order')->where('doctor_id',$this->auth->id)->where('id',$order_id)->find();
|
|
|
+ if(empty($wenzhen_order)){
|
|
|
+ $this->error('不存在的订单');
|
|
|
+ }
|
|
|
+
|
|
|
+ if($wenzhen_order['ordertype'] != 2){
|
|
|
+ $this->error('视频订单才能拨打视频');
|
|
|
+ }
|
|
|
+
|
|
|
+ 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('未到预约时间');
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->success('操作成功');
|
|
|
+ }
|
|
|
+
|
|
|
//第一次拨打视频
|
|
|
public function first_video(){
|
|
|
$apilimit = $this->apiLimit();
|