Commit dd92db88 authored by hujun's avatar hujun

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

# Conflicts: # application/api/extend/Basic.php
parent 86729a1c
......@@ -288,7 +288,7 @@ class Broker extends Basic
if (empty($this->params['phone'])) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $this->params['agent_id']);
} 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'];
......@@ -303,4 +303,40 @@ class Broker extends Basic
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']);
}
}
......@@ -66,6 +66,8 @@ class Basic extends Controller
"api/getVersionNoV2",
"api/getMarchInList",
"api/addSublet",
"api/getSiteListApp",
"api/recordCallNumShare"
);
/**
......
......@@ -351,6 +351,7 @@ Route::group('api', [
//post broker
'appraiser' => [ 'api/broker/appraiser', [ 'method' => 'post' ] ], //评价经纪人
'recordCallNum' => [ 'api/broker/recordCallNum', [ 'method' => 'post' ] ], //记录拨打经纪人号码
'recordCallNumShare' => [ 'api/broker/recordCallNumShare', [ 'method' => 'post' ] ], //记录拨打经纪人号码
//get member
'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