Commit 00a93fa4 authored by hujun's avatar hujun

后台拨打接口调整

parent 80778afd
......@@ -150,22 +150,23 @@ class CellPhone extends Basic
$user_id = 0;
$phone_b = 0;
if (empty($this->params['phone_b'])) {
$user_id = $this->params['user_id'];
$user_id = (int)$this->params['user_id'];
} else {
$phone_b = $this->params['phone_b'];
}
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id'];
$landlord = empty($this->params['landlord']) ? 0: (int)$this->params['landlord'];
$record = true; //录音
$call_phone = new CallPhoneService($this->city);
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b, $record, $user_id, $this->userId, $this->userName, $house_id);
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b, $record, $user_id, $this->userId, $this->userName, $landlord, $house_id);
$result['msg'] = '';
if ($data['status'] == 'success') {
$push = new PushMessageService();
$push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']);
$result['code'] = 200;
$result['data']['phone'] = $data['phone'];
$result['data']['follow_id'] = $data['follow_id'];
$result['phone'] = $data['phone'];
$result['follow_id'] = $data['follow_id'];
} else {
$result['status'] = 101;
$result['msg'] = $data['msg'];
......
......@@ -772,7 +772,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
function freePhone(obj){
$.ajax({
type: 'POST',
url: '/broker/agentsUnBind',
url: '/index/agentsUnBind',
data: {
'AuthToken': _token,
'phone_x': _backPhone,
......@@ -989,7 +989,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
if(_selectPhone && user.customerInfo.user_phone){
$.ajax({
type: 'POST',
url: '/broker/bindAXB',
url: '/index/bindAXB',
data: {
'AuthToken': _token,
'phone_a': _selectPhone,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment