Commit 4351c7f4 authored by hujun's avatar hujun

验证权限

parent c37a7d66
......@@ -994,4 +994,27 @@ class Broker extends Basic
return $this->response("200", "成功",['data'=>$res,'total'=>$res_total]);
}
/**
* 验证权限
*
* @return \think\Response
*/
public function checkAuth() {
$url = $this->params['url'];
if (empty($url)) {
return $this->response(101, '条件为空');
}
$code = 200;
$msg = '';
$vip_service = new VipService();
$is_ = $vip_service->vip($this->agentId, $url);
if ($is_) {
$code = 101;
$msg = '没有权限';
}
return $this->response($code, $msg);
}
}
\ No newline at end of file
......@@ -604,6 +604,7 @@ Route::group('broker', [
'vip' => ['api_broker/broker/vip', ['method' => 'get|post']],
'userStateSearch' => ['api_broker/broker/userStateSearch', ['method' => 'get|post']],//新增-客户电话跟进
'user_search' => ['api_broker/broker/user_search', ['method' => 'get|post']],//客户搜索
'checkAuth' => ['api_broker/broker/checkAuth', ['method' => 'get']],//权限验证
'bindAXB' => ['api_broker/CellPhone/bindAXB', ['method' => 'post']],//隐私号码
'agentsUnBind' => ['api_broker/CellPhone/agentsUnBind', ['method' => 'post']],//解除绑定关系
'updateBindAXB' => ['api_broker/CellPhone/updateBindAXB', ['method' => 'post']], //更新绑定关系隐私号码
......
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