瀏覽代碼

关注和粉丝调整

zhangxiaobin 1 年之前
父節點
當前提交
932381cfcb
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      application/api/controller/Usercenter.php

+ 2 - 0
application/api/controller/Usercenter.php

@@ -66,11 +66,13 @@ class UserCenter extends Common
         $where["user_id"] = $user_id;
         $userCount = $followModel->where($where)->value("follows"); //该用户关注了几个人
         $userInfo["follows_count"] = $userCount?$userCount:0;
+        $userInfo["follows"] = $userInfo["follows_count"];//前端字段使用不一致添加
         // 获取粉丝数
         $where = [];
         $where["user_id"] = $user_id;
         $fansCount = $fansModel->where($where)->value("fans"); //该用户的粉丝数
         $userInfo["fans_count"] = $fansCount?$fansCount:0;
+        $userInfo["fans"] = $userInfo["fans_count"];//前端字段使用不一致添加
         // 获取贵族信息
         $nobleInfo = $this->userModel->getUserNobleInfo($user_id);
         // 查看者是否已关注