|
@@ -143,13 +143,13 @@ class Usercenter extends Api
|
|
|
$userinfo['is_black'] = $is_black ? 1 : 0;
|
|
|
|
|
|
//关注人数,粉丝人数
|
|
|
- $follow_num = Db::name('user_follow')->where(['uid'=>$this->auth->id])->count('id');
|
|
|
- $fans_num = Db::name('user_follow')->where(['follow_uid'=>$this->auth->id])->count('id');
|
|
|
+ $follow_num = Db::name('user_follow')->where(['uid'=>$uid])->count('id');
|
|
|
+ $fans_num = Db::name('user_follow')->where(['follow_uid'=>$uid])->count('id');
|
|
|
$userinfo['follow_num'] = $follow_num;
|
|
|
$userinfo['fans_num'] = $fans_num;
|
|
|
|
|
|
//访客数
|
|
|
- $visit_num = Db::name('user_visit')->where(['to_uid'=>$this->auth->id])->count('id');
|
|
|
+ $visit_num = Db::name('user_visit')->where(['to_uid'=>$uid])->count('id');
|
|
|
$userinfo['visit_num'] = $visit_num;
|
|
|
|
|
|
//查询是否打过招呼
|
|
@@ -285,11 +285,17 @@ class Usercenter extends Api
|
|
|
}
|
|
|
|
|
|
if(empty($gift_user_typing) && !empty($gift_user_dongtai)){
|
|
|
- return $gift_user_dongtai;
|
|
|
+ foreach($gift_user_dongtai as $key => $val){
|
|
|
+ $result[] = $val;
|
|
|
+ }
|
|
|
+ return $result;
|
|
|
}
|
|
|
|
|
|
if(!empty($gift_user_typing) && empty($gift_user_dongtai)){
|
|
|
- return $gift_user_typing;
|
|
|
+ foreach($gift_user_typing as $key => $val){
|
|
|
+ $result[] = $val;
|
|
|
+ }
|
|
|
+ return $result;
|
|
|
}
|
|
|
|
|
|
//合并
|