Commit 6905e4c3 authored by hujun's avatar hujun

center

parent e2ee48d5
......@@ -55,4 +55,36 @@ class MyCenter extends Basic
}
}
/**
* 我得个人中心
* @return \think\Response
*/
public function centerV2()
{
$params = $this->params;
/* $params = array(
"agent_id" => 1
);*/
if (empty($params['agent_id'])) {
if (empty($this->agentId)) {
return $this->response("101", "请求参数错误");
}
$agent_id = $this->agentId;
} else {
$agent_id = $params["agent_id"];
}
try {
$result = $this->service_->centerV2($agent_id);
if ($result) {
return $this->response("200", "request success", $result);
} else {
return $this->response("200", "request null");
}
} catch (Exception $exception) {
return $this->response("101", "request error, msg:" . $exception);
}
}
}
......@@ -122,12 +122,12 @@ class MyCenterService{
$auth_group = $redis->getRedisCache(3, $result['auth_group_id']);
$result['auth_group_name'] = empty($auth_group['title']) ? '':$auth_group['title'];
$is_ok = $redis->checkRule($redis['id'], 'index/dailyDetailsFinance');
$is_ok = $redis->checkRule($result['id'], 'index/dailyDetailsFinance');
if (!$is_ok) {
$result['show_daily'] = 1; //财务日报
}
$is_ok = $redis->checkRule($redis['id'], 'broker/costList');
$is_ok = $redis->checkRule($result['id'], 'broker/costList');
if (!$is_ok) {
$result['show_cost_list'] = 1; //显示费用申请
}
......
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