Commit 77e7fea9 authored by hujun's avatar hujun

容联云绑定

parent 3321bb9b
...@@ -53,18 +53,9 @@ class CallPhoneService ...@@ -53,18 +53,9 @@ class CallPhoneService
public function bindAXB($phone_a, $phone_b, $record = true, int $user_id) public function bindAXB($phone_a, $phone_b, $record = true, int $user_id)
{ {
$result['status'] = 'failed'; $result['status'] = 'failed';
if (empty($phone_a) || empty($phone_b)) {
$result['msg'] = '参数错误,请联系运营人员!';
return $result;
}
if (strlen($phone_a) != 11) { if (strlen($phone_a) != 11) {
$result['msg'] = '本机号码格式错误!'; $result['msg'] = '本机号码格式错误,请重新编辑!';
return $result;
}
if (strlen($phone_b) != 11) {
$result['msg'] = '客户手机号码格式错误,请与客方沟通!';
return $result; return $result;
} }
...@@ -77,6 +68,22 @@ class CallPhoneService ...@@ -77,6 +68,22 @@ class CallPhoneService
$phone_b = $user_data['user_phone']; $phone_b = $user_data['user_phone'];
} }
if (empty($phone_a)) {
$result['msg'] = '参数错误(A),请截图联系运营人员!';
return $result;
}
if (empty($phone_b)) {
$result['msg'] = '参数错误(B),请截图联系运营人员!';
return $result;
}
if (strlen($phone_b) != 11) {
$result['msg'] = '客户手机号码格式错误,请与客方沟通!';
return $result;
}
$call_phone = []; $call_phone = [];
$this->phone_a = $phone_a;//经纪人手机号 $this->phone_a = $phone_a;//经纪人手机号
$this->phone_b = $phone_b;//客户手机号 $this->phone_b = $phone_b;//客户手机号
...@@ -174,7 +181,7 @@ class CallPhoneService ...@@ -174,7 +181,7 @@ class CallPhoneService
{ {
$data['status'] = 'success'; $data['status'] = 'success';
$data['msg'] = ''; $data['msg'] = '';
if (empty($phone_x) || empty($phone_b)) { if (empty($phone_x)) {
$data['status'] = 'failed'; $data['status'] = 'failed';
$data['msg'] = '解除失败,请联系运营人员!'; $data['msg'] = '解除失败,请联系运营人员!';
return $data; return $data;
...@@ -205,6 +212,12 @@ class CallPhoneService ...@@ -205,6 +212,12 @@ class CallPhoneService
$this->phone_b = $phone_b; $this->phone_b = $phone_b;
} }
if (empty($this->phone_b)) {
$data['status'] = 'failed';
$data['msg'] = '解除失败,请联系运营人员!';
return $data;
}
$phone = new BindingPhone(); $phone = new BindingPhone();
try { try {
...@@ -328,9 +341,11 @@ class CallPhoneService ...@@ -328,9 +341,11 @@ class CallPhoneService
} }
} }
//绑定失败返回错误信息 if ($data['status'] != 'success') {
$data['status'] = 'failed'; //绑定失败返回错误信息
$data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'; $data['status'] = 'failed';
$data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
}
} }
return $data; return $data;
......
...@@ -698,7 +698,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -698,7 +698,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: ServerHostTempC + '/index/agentsUnBind', url: '/index/agentsUnBind',
data: { data: {
'AuthToken': _token, 'AuthToken': _token,
'phone_x': _backPhone, 'phone_x': _backPhone,
......
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