Commit 445c46d0 authored by hujun's avatar hujun

后台拨打电话

parent 202715a8
......@@ -12,6 +12,7 @@ use app\api_broker\service\CallPhoneService;
use app\api_broker\service\PushMessageService;
use app\index\extend\Basic;
use app\model\SecretReport;
use app\model\Users;
class CellPhone extends Basic
......@@ -129,6 +130,9 @@ class CellPhone extends Basic
* 绑定手机号
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function bindAXB()
{
......@@ -136,8 +140,21 @@ class CellPhone extends Basic
return $this->response(101, '客户id为空');
}
if (empty($this->params['phone_b'])) {
$m_user = new Users();
$user_phone = $m_user->selectUser($this->params['user_id'], 'user_phone');
if (empty($user_phone['user_phone'])) {
return $this->response(101, '没有用户信息');
}
$phone_b = $user_phone['user_phone'];
} else {
$phone_b = $this->params['phone_b'];
}
$call_phone = new CallPhoneService();
$data = $call_phone->bindAXB($this->params['phone_a'], $this->params['phone_b']);
$data = $call_phone->bindAXB($this->params['phone_a'], $phone_b);
$result['msg'] = '';
if ($data['status'] == 'success') {
$push = new PushMessageService();
......
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