|
@@ -19,13 +19,6 @@ class Userfollow extends Api
|
|
|
$user_id = $this->auth->id;
|
|
|
}
|
|
|
|
|
|
- //如果不是我,并且开了隐私,直接返回空
|
|
|
- if($user_id != $this->auth->id){
|
|
|
- $yinsi = $this->user_power($user_id,'yinsi');
|
|
|
- if($yinsi == 1){
|
|
|
- $this->success(1,[]);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
//列表
|
|
|
$list = Db::name('user_follow')
|
|
@@ -61,23 +54,14 @@ class Userfollow extends Api
|
|
|
$user_id = $this->auth->id;
|
|
|
}
|
|
|
|
|
|
- //如果不是我,并且开了隐私,直接返回空
|
|
|
- if($user_id != $this->auth->id){
|
|
|
- $yinsi = $this->user_power($user_id,'yinsi');
|
|
|
- if($yinsi == 1){
|
|
|
- $this->success(1,[]);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
//列表
|
|
|
$list = Db::name('user_follow')
|
|
|
->alias('follow')
|
|
|
->join('user','follow.uid = user.id','LEFT')
|
|
|
->join('user_wallet uw','user.id = uw.user_id','LEFT')
|
|
|
- ->join('user_power power','user.id = power.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',$user_id)
|
|
|
- ->where('power.yinsi',0)
|
|
|
->group('follow.uid')
|
|
|
->order('follow.id desc')->autopage()->select();
|
|
|
|
|
@@ -255,7 +239,7 @@ class Userfollow extends Api
|
|
|
];
|
|
|
|
|
|
$check = Db::name('user_follow')->where($map2)->find();
|
|
|
- if(empty($check) && $this->user_power($this->auth->id,'yinsi') != 1){
|
|
|
+ if(empty($check)){
|
|
|
//防止重复刷关注,先删掉以前的,再加新的
|
|
|
Db::name('message')
|
|
|
->where('user_id',$follow_uid)
|