Commit 80e5e2ac authored by hujun's avatar hujun

记录分享拨打,去除token验证

parent 9ff32c2d
...@@ -288,7 +288,7 @@ class Broker extends Basic ...@@ -288,7 +288,7 @@ class Broker extends Basic
if (empty($this->params['phone'])) { if (empty($this->params['phone'])) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $this->params['agent_id']); $agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $this->params['agent_id']);
} else { } else {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id', $this->params['agent_id']]); $agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id'=>$this->params['agent_id']]);
} }
$insert_data['update_time'] = $agents_data['update_time']; $insert_data['update_time'] = $agents_data['update_time'];
...@@ -303,4 +303,40 @@ class Broker extends Basic ...@@ -303,4 +303,40 @@ class Broker extends Basic
return $this->response($data['status'], $data['msg'], $data['data']); return $this->response($data['status'], $data['msg'], $data['data']);
} }
/**
* 记录客户拨打经纪人次数(分享使用)
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function recordCallNumShare()
{
$data['status'] = 200;
$data['data'] = [];
$data['msg'] = '';
if ($this->params['agent_id'] > 0) {
$redis = new VerifyRepetitionService();
$is = $redis->verifyStart(2, $this->params['phone'], 0);
if ($is) {
$m_agents = new AAgents();
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id'=> $this->params['agent_id']]);
$insert_data['update_time'] = $agents_data['update_time'];
$insert_data['call_number'] = $agents_data['call_number'] + 1;
$data['data'] = $m_agents->editData($insert_data, $agents_data['id']);
}
} else {
$data['status'] = 101;
$data['msg'] = 'agent_id is null';
}
return $this->response($data['status'], $data['msg'], $data['data']);
}
} }
...@@ -67,6 +67,7 @@ class Basic extends Controller ...@@ -67,6 +67,7 @@ class Basic extends Controller
"api/getMarchInList", "api/getMarchInList",
"api/addSublet", "api/addSublet",
"api/getSiteListApp", "api/getSiteListApp",
"api/recordCallNumShare"
); );
/** /**
......
...@@ -360,6 +360,7 @@ Route::group('api', [ ...@@ -360,6 +360,7 @@ Route::group('api', [
//post broker //post broker
'appraiser' => [ 'api/broker/appraiser', [ 'method' => 'post' ] ], //评价经纪人 'appraiser' => [ 'api/broker/appraiser', [ 'method' => 'post' ] ], //评价经纪人
'recordCallNum' => [ 'api/broker/recordCallNum', [ 'method' => 'post' ] ], //记录拨打经纪人号码 'recordCallNum' => [ 'api/broker/recordCallNum', [ 'method' => 'post' ] ], //记录拨打经纪人号码
'recordCallNumShare' => [ 'api/broker/recordCallNumShare', [ 'method' => 'post' ] ], //记录拨打经纪人号码
//get member //get member
'logout' => [ 'api/member/logout', [ 'method' => 'get' ] ], 'logout' => [ 'api/member/logout', [ 'method' => 'get' ] ],
......
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