Commit 00a93fa4 authored by hujun's avatar hujun

后台拨打接口调整

parent 80778afd
...@@ -150,22 +150,23 @@ class CellPhone extends Basic ...@@ -150,22 +150,23 @@ class CellPhone extends Basic
$user_id = 0; $user_id = 0;
$phone_b = 0; $phone_b = 0;
if (empty($this->params['phone_b'])) { if (empty($this->params['phone_b'])) {
$user_id = $this->params['user_id']; $user_id = (int)$this->params['user_id'];
} else { } else {
$phone_b = $this->params['phone_b']; $phone_b = $this->params['phone_b'];
} }
$house_id = empty($this->params['house_id']) ? 0:(int)$this->params['house_id']; $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; //录音 $record = true; //录音
$call_phone = new CallPhoneService($this->city); $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'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
$push = new PushMessageService(); $push = new PushMessageService();
$push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']); $push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info', $this->params['user_id']);
$result['code'] = 200; $result['code'] = 200;
$result['data']['phone'] = $data['phone']; $result['phone'] = $data['phone'];
$result['data']['follow_id'] = $data['follow_id']; $result['follow_id'] = $data['follow_id'];
} else { } else {
$result['status'] = 101; $result['status'] = 101;
$result['msg'] = $data['msg']; $result['msg'] = $data['msg'];
......
...@@ -772,7 +772,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -772,7 +772,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
function freePhone(obj){ function freePhone(obj){
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/broker/agentsUnBind', url: '/index/agentsUnBind',
data: { data: {
'AuthToken': _token, 'AuthToken': _token,
'phone_x': _backPhone, 'phone_x': _backPhone,
...@@ -989,7 +989,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -989,7 +989,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
if(_selectPhone && user.customerInfo.user_phone){ if(_selectPhone && user.customerInfo.user_phone){
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/broker/bindAXB', url: '/index/bindAXB',
data: { data: {
'AuthToken': _token, 'AuthToken': _token,
'phone_a': _selectPhone, '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