@@ -30,6 +30,6 @@ class LiveModel extends BaseModel
{
return $this->hasOne(MemberModel::class, 'id','user_id')
->where(['mark'=>1])
- ->select(['id','nickname','parent_id','balance','usdt','avatar','status']);
+ ->select(['id','nickname','parent_id','balance','gender','usdt','avatar','status']);
}
@@ -186,8 +186,14 @@ class LiveService extends BaseService
}else{
$checkFollow = MemberCollectService::make()->checkCollect($userId, $info['user_id'], 1);
$info['is_follow'] = $checkFollow? 1 : 0;
+ $info['member']['is_follow'] = $checkFollow? 1 : 0;
+ // 用户资料
+ $liveUserId = isset($info['user_id'])? $info['user_id'] : 0;
+ $info['member']['fans'] = (int)MemberCollectService::make()->getCount($liveUserId, 1,1); // 粉丝数量(被关注)
+ $info['member']['follow'] = (int)MemberCollectService::make()->getCount($liveUserId, 1,2); // 关注数量
+
// 观看权限
$info['view_limit'] = 0;
if($info['status'] == 2){