后台电话绑定AXN改AXB
This commit is contained in:
@@ -851,21 +851,28 @@ 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);
|
||||
//改AXB模式 结束
|
||||
if ($result['result'] != '000000') { //绑定失败
|
||||
debug_log("xz_result:" . json_encode($result, JSON_UNESCAPED_UNICODE));
|
||||
return $this->show_json(SYS_CODE_FAIL, $result['message']);
|
||||
|
||||
@@ -60,7 +60,8 @@ class Yxcall extends HD_Controller
|
||||
$this->mdOplogs->add($addData);
|
||||
$ycall = new Ycall();
|
||||
//解绑
|
||||
$ycall->AXBUnbind($data['virtualMobile'], $data['calleeNumber']);
|
||||
// $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();
|
||||
//解绑
|
||||
|
||||
Reference in New Issue
Block a user