Browse Source

搜索和关注

lizhen_gitee 1 year ago
parent
commit
c78d05f42f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      application/common/model/Eyemargin.php

+ 5 - 0
application/common/model/Eyemargin.php

@@ -125,6 +125,11 @@ class Eyemargin extends Model
         $res['is_like'] = $is_like?1:0;
         // 获取是否显示分享
         $res['is_share'] = config("site.invite")?1:0;
+
+        //是否已关注
+        $follow_info = Db::name('user_follow')->where(['user_id' => $user_id, 'to_user_id' => $fate_user_id])->find();
+        $res['is_follow'] = $follow_info ? 1 : 0;
+
         return $res;
     }