Commit d5a7b406 authored by zhuwei's avatar zhuwei

bug

parent 65145866
...@@ -115,7 +115,7 @@ class Square extends Basic ...@@ -115,7 +115,7 @@ class Square extends Basic
return $this->response("101", "参数不全"); return $this->response("101", "参数不全");
} }
$result= $this->s_square->getCommenInfo($params); $result= $this->s_square->getCommenInfo($params,$this->agentId);
if($result){ if($result){
return $this->response("200", "成功",$result); return $this->response("200", "成功",$result);
......
...@@ -297,7 +297,7 @@ class SquareService ...@@ -297,7 +297,7 @@ class SquareService
} }
} }
public function getCommenInfo($params){ public function getCommenInfo($params,$agent_id){
$field = 'Comment.id,Comment.comment,Comment.create_time,Comment.agent_id';// $field = 'Comment.id,Comment.comment,Comment.create_time,Comment.agent_id';//
$get_params['Comment.id'] = $params['id']; $get_params['Comment.id'] = $params['id'];
$res = $this->m_coment->getCommenInfo($field,$get_params); $res = $this->m_coment->getCommenInfo($field,$get_params);
...@@ -305,7 +305,9 @@ class SquareService ...@@ -305,7 +305,9 @@ class SquareService
$agent = $this->redis->getRedisCache(2, $res['agent_id']) ; $agent = $this->redis->getRedisCache(2, $res['agent_id']) ;
$res['name'] = $agent['name']; $res['name'] = $agent['name'];
$res['image_path'] = AGENTHEADERIMGURL . $agent['img'];//'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg'; $res['image_path'] = AGENTHEADERIMGURL . $agent['img'];//'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg';
//权限
$vip = new VipService();//0:有权限 1:无权限
$res['is_can_edit'] = $vip->vip($agent_id, 'editSquare');
return $res; return $res;
} }
......
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