ycall
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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 = '未接通';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user