|
@@ -23,7 +23,7 @@ class member_relationControl extends mbMemberControl
|
|
|
//我关注的人
|
|
|
public function subscriberOp()
|
|
|
{
|
|
|
- $iRelation = new \relation\mem_relation($_SESSION['member_id']);
|
|
|
+ $iRelation = new relation\mem_relation($_SESSION['member_id']);
|
|
|
$follower = $iRelation->follower();
|
|
|
|
|
|
$mem_desc = array();
|
|
@@ -43,10 +43,10 @@ class member_relationControl extends mbMemberControl
|
|
|
$f_infos = Model('member_relation')->getRelationList(array('member_id' => array('in',$follower)));
|
|
|
foreach ($f_infos as $val)
|
|
|
{
|
|
|
- $relation = new \relation\mem_relation($val);
|
|
|
- $item = array('fans_count' =>$relation->subscriber_count(),
|
|
|
- 'member_id' => $relation->member_id(),
|
|
|
- 'subscribed' => true);
|
|
|
+ $relation = new relation\mem_relation($val);
|
|
|
+ $item = ['fans_count' =>$relation->subscriber_count(),
|
|
|
+ 'member_id' => $relation->member_id(),
|
|
|
+ 'subscribed' => true];
|
|
|
array_push($follower_infos,$item);
|
|
|
}
|
|
|
}
|
|
@@ -60,34 +60,35 @@ class member_relationControl extends mbMemberControl
|
|
|
//我的粉丝
|
|
|
public function followerOp()
|
|
|
{
|
|
|
- $iRelation = new \relation\mem_relation($_SESSION['member_id']);
|
|
|
- $follower = $iRelation->subscriber();
|
|
|
+ $iRelation = new relation\mem_relation($_SESSION['member_id']);
|
|
|
+ $follows = $iRelation->subscriber();
|
|
|
|
|
|
$mem_desc = array();
|
|
|
$pages = 0;
|
|
|
$follower_infos = array();
|
|
|
- if(!empty($follower))
|
|
|
+ if(!empty($follows))
|
|
|
{
|
|
|
- $follower = self::separate_page($follower,$pages);
|
|
|
- $members = Model('member')->getMemberList(array('member_id' => array('in',$follower)));
|
|
|
+ $follows = self::separate_page($follows,$pages);
|
|
|
+ $members = Model('member')->getMemberList(array('member_id' => array('in',$follows)));
|
|
|
foreach ($members as $val) {
|
|
|
$info = new member_info($val);
|
|
|
array_push($mem_desc,$info->filter());
|
|
|
}
|
|
|
- $f_infos = Model('member_relation')->getRelationList(array('member_id' => array('in',$follower)));
|
|
|
- foreach ($f_infos as $val) {
|
|
|
- $relation = new \relation\mem_relation($val);
|
|
|
- $item = array('fans_count' => $relation->subscriber_count(),
|
|
|
- 'member_id' => $relation->member_id(),
|
|
|
- 'subscribed' => $iRelation->is_follower($relation->member_id()));
|
|
|
+ $f_infos = Model('member_relation')->getRelationList(array('member_id' => array('in',$follows)));
|
|
|
+ foreach ($f_infos as $val)
|
|
|
+ {
|
|
|
+ $relation = new relation\mem_relation($val);
|
|
|
+ $item = [ 'fans_count' => $relation->subscriber_count(),
|
|
|
+ 'member_id' => $relation->member_id(),
|
|
|
+ 'subscribed' => $iRelation->is_follower($relation->member_id())];
|
|
|
array_push($follower_infos,$item);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return self::outsuccess(array('followers' => $follower_infos,
|
|
|
- 'count' => $iRelation->subscriber_count(),
|
|
|
- 'mem_desc' => $mem_desc,
|
|
|
- 'mobile_page' => mobile_page($pages)));
|
|
|
+ return self::outsuccess(['followers' => $follower_infos,
|
|
|
+ 'count' => $iRelation->subscriber_count(),
|
|
|
+ 'mem_desc' => $mem_desc,
|
|
|
+ 'mobile_page' => mobile_page($pages)]);
|
|
|
}
|
|
|
|
|
|
public function subscribeOp()
|