Browse Source

亲密度,男女改小大

lizhen_gitee 1 year ago
parent
commit
2bcc1cda7e
2 changed files with 2 additions and 32 deletions
  1. 2 2
      application/api/controller/Match.php
  2. 0 30
      application/api/controller/Userfollow.php

+ 2 - 2
application/api/controller/Match.php

@@ -533,10 +533,10 @@ class Match extends Api
         if (!$user_id) {
             $this->error('参数缺失');
         }
-        if ($this->auth->gender == 0) { //女用户
+        if ($this->auth->id > $user_id) { //大的在后
             $where['uid'] = $user_id;
             $where['other_uid'] = $this->auth->id;
-        } else { //男用户
+        } else { //小的在前
             $where['uid'] = $this->auth->id;
             $where['other_uid'] = $user_id;
         }

+ 0 - 30
application/api/controller/Userfollow.php

@@ -120,36 +120,6 @@ class Userfollow extends Api
         $this->success('success',$new_rs);
     }
 
-    //好友审核列表。粉丝列表改的。关注了我,我还没关注他的
-    //接口废弃,使用 newfriend_list
-    public function my_fans_unfollow_list(){
-
-        //我的关注uids
-        $my_follow_uids = $this->my_follow_uids();
-
-        $list = Db::name('user_follow')
-            ->alias('follow')
-            ->join('user','follow.uid = user.id','LEFT')
-            ->join('user_wallet uw','user.id = uw.user_id','LEFT')
-            ->field('user.id,user.username,user.nickname,user.avatar,user.bio,user.birthday,user.gender,user.attribute,uw.vip_endtime')
-            ->where('follow.follow_uid',$this->auth->id)->where('user.id','NOT IN',$my_follow_uids)->order('follow.id desc')->autopage()->select();
-
-        $list = list_domain_image($list,['avatar']);
-        $list = list_birthday_age($list);
-
-        if(!empty($list)){
-            foreach($list as $key => &$val){
-                //用户vip
-                $val['is_vip'] = $val['vip_endtime'] > time() ? 1 : 0;
-                unset($val['vip_endtime']);
-                //是否关注
-                $val['is_follow'] = in_array($val['id'],$my_follow_uids) ? 1 : 0;
-            }
-        }
-
-        $this->success('success',$list);
-    }
-
     //好友待审核列表。
     public function newfriend_list(){
         //我的关注uids