diff --git a/api/controllers/plan/Xzcall.php b/api/controllers/plan/Xzcall.php index 5119eef9..f95fd606 100644 --- a/api/controllers/plan/Xzcall.php +++ b/api/controllers/plan/Xzcall.php @@ -32,12 +32,6 @@ class Xzcall extends HD_Controller debug_log("start function:" . __FUNCTION__, $this->log_file); $data = $this->input->post(); debug_log('data:' . json_encode($data, JSON_UNESCAPED_UNICODE), $this->log_file); - if($data['virtualMobile']=='13391247942'){ //推送test环境 - $url = "https://api.lc.haodian.cn/plan/xzcall"; - $res = $this->mycurl->httpPost($url,$data); - debug_log('结束,推送test环境:'.json_encode($res,JSON_UNESCAPED_UNICODE), $this->log_file); - exit; - } if ($data && $data['seqId']) { $row = $this->receiver_xz_model->get(array('call_id' => $data['seqId'])); if ($row) { @@ -103,6 +97,12 @@ class Xzcall extends HD_Controller $this->customers_entity->add_log_visit($cust['id'], $row['cf_uid'], $data['uname'], $row['id'], 2,$visit); } } else { + if($data['virtualMobile']=='13391247942'){ //推送test环境 + $url = "https://api.lc.haodian.cn/plan/xzcall"; + $this->load->library('mycurl'); + $res = $this->mycurl->httpPost($url,$data); + debug_log('结束,推送test环境:'.json_encode($res,JSON_UNESCAPED_UNICODE), $this->log_file); + } debug_log("error: 未找到拨打记录", $this->log_file); } } @@ -148,6 +148,12 @@ class Xzcall extends HD_Controller $jsondata['file_info'] = $data; $up_data['json_data'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE); $this->receiver_xz_model->update($up_data, ['id' => $row['id']]); + }else{ + //推送test环境 + $url = "https://api.lc.haodian.cn/plan/xzcall/video"; + $this->load->library('mycurl'); + $res = $this->mycurl->httpPost($url,$data); + debug_log('结束,推送test环境:'.json_encode($res,JSON_UNESCAPED_UNICODE), $this->log_file); } debug_log("end " . __FUNCTION__, $this->log_file); echo '{"result":"0","error":""}';