From db448b569b9aeca6611ed16657561aa50346ccd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B1=BC=E5=BC=80=E5=8F=91?= Date: Thu, 20 Jun 2024 12:07:03 +0800 Subject: [PATCH] ycall --- admin/controllers/Common.php | 30 ++++++++++++------------- admin/controllers/receiver/Customer.php | 2 +- api/controllers/plan/Yxcall.php | 6 ++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/admin/controllers/Common.php b/admin/controllers/Common.php index 0c790d6c..44d9c7de 100644 --- a/admin/controllers/Common.php +++ b/admin/controllers/Common.php @@ -851,27 +851,27 @@ class Common extends CI_Controller return $this->show_json(SYS_CODE_FAIL, '手机不存在!'); } $mobile = $re['mobile']; -// $cache = &load_cache('redis'); -// $xz_admin_phone = $cache->get('xz_admin_phone'); -// $middleNumber = ''; -// if ($xz_admin_phone) { -// $middleNumber = $xz_admin_phone['admins'][$this->uid]; -// } -// if (!$middleNumber) { -// return $this->show_json(SYS_CODE_FAIL, '还未分配号码不可使用'); -// } + $cache = &load_cache('redis'); + $xz_admin_phone = $cache->get('xz_admin_phone'); + $middleNumber = ''; + if ($xz_admin_phone) { + $middleNumber = $xz_admin_phone['admins'][$this->uid]; + } + if (!$middleNumber) { + return $this->show_json(SYS_CODE_FAIL, '还未分配号码不可使用'); + } $this->load->helper('order'); require_once COMMPATH . 'third_party/Ycall/Ycall.php'; $seq_id = create_order_no(); $ycall = new Ycall(); $maxBindingTime = 30;//绑定时间 -// $result = $ycall->AXbind($middleNumber, $mobile, '', $maxBindingTime, ''); + $result = $ycall->AXbind($middleNumber, $mobile, '', $maxBindingTime, ''); //改AXB模式 开始 - $this->load->model('sys/sys_admin_model'); - $user = $this->sys_admin_model->get(['id'=>$this->uid]); - $user_mobile = $user['mobile']; - if(!$user_mobile) return $this->show_json(SYS_CODE_FAIL, '管理员未设置手机号'); - $result = $ycall->ABXbind($user_mobile, $mobile, $seq_id, $maxBindingTime); +// $this->load->model('sys/sys_admin_model'); +// $user = $this->sys_admin_model->get(['id'=>$this->uid]); +// $user_mobile = $user['mobile']; +// if(!$user_mobile) return $this->show_json(SYS_CODE_FAIL, '管理员未设置手机号'); +// $result = $ycall->ABXbind($user_mobile, $mobile, $seq_id, $maxBindingTime); //改AXB模式 结束 if ($result['result'] != '000000') { //绑定失败 debug_log("xz_result:" . json_encode($result, JSON_UNESCAPED_UNICODE)); diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index 4ad5b21c..c5ddaa8c 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -635,7 +635,7 @@ class Customer extends HD_Controller if ($value['type'] == 2) { $rec_row = $this->receiver_yx_model->get(['id' => $value['log']], 'rec_url,duration'); if ($rec_row['duration']) { - $rec_row['rec_url'] && $rec_url = get_yx_video($rec_row['rec_url']); + $rec_row['rec_url'] && $rec_url = build_qiniu_image_url($row['rec_url'], 0, 0, 'video'); !$rec_row['rec_url'] && $rec_text = '录音暂未生成'; } else { $rec_text = '未接通'; diff --git a/api/controllers/plan/Yxcall.php b/api/controllers/plan/Yxcall.php index 7bf119db..bdc24c70 100644 --- a/api/controllers/plan/Yxcall.php +++ b/api/controllers/plan/Yxcall.php @@ -60,8 +60,8 @@ class Yxcall extends HD_Controller $this->mdOplogs->add($addData); $ycall = new Ycall(); //解绑 -// $ycall->AXBUnbind($data['virtualMobile'], $data['calleeNumber']); - $result = $ycall->AXBUnbind($data['displayNumber'], $data['calleeNumber'], $data['callerNumber']); + $ycall->AXBUnbind($data['virtualMobile'], $data['calleeNumber']); +// $result = $ycall->AXBUnbind($data['displayNumber'], $data['calleeNumber'], $data['callerNumber']); } elseif ($row['cf_id'] && $row['cf_platform'] == 'api') { //理车宝 $ycall = new Ycall(); //解绑 @@ -122,7 +122,7 @@ class Yxcall extends HD_Controller { $this->load->helper('image'); $arr = explode('?', $url); - $this->load->library('qiniu'); + $this->load->library('qiniu', array('type' => 'video')); $filename = $this->qiniu->getFileName($arr[0] . $i); $filename = 'yx/' . $filename; $info = $this->qiniu->getInfo($filename);