Commit 4474f24f by 冷斌

fix bug

parent 3d9f6b02
...@@ -39,6 +39,21 @@ class ProfitController extends HomebaseController ...@@ -39,6 +39,21 @@ class ProfitController extends HomebaseController
$this->display(); $this->display();
} }
protected function getFamilyRole($uid)
{
$type = 0;
$familyinfo = M('family')->where("uid=" . $uid)->find();
$user_family = M('users_family')->where("uid=" . $uid)->find();
if (!empty($familyinfo)) {
$type = 1;
}
if (!empty($user_family)) {
$type = $user_family['role'] ? 2 : 3;
}
return $type;
}
protected function getInfo() protected function getInfo()
{ {
$uid=I("uid"); $uid=I("uid");
...@@ -76,6 +91,7 @@ class ProfitController extends HomebaseController ...@@ -76,6 +91,7 @@ class ProfitController extends HomebaseController
} }
} }
$data['certification'] = $certification; $data['certification'] = $certification;
$data['family_type'] = $this->getFamilyRole($uid);
return $data; return $data;
} }
......
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