Browse Source

他人主页

lizhen_gitee 6 months ago
parent
commit
eca712022f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      application/api/controller/Usercenter.php

+ 3 - 3
application/api/controller/Usercenter.php

@@ -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;
 
         //查询是否打过招呼