From d31b8e1960e15e77edf67406dd0e82dd14a2b2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 9 Dec 2025 18:00:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E7=94=A8=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index 7af1b206..4b080800 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1808,18 +1808,13 @@ class Room extends Model $lists['on_pit'] = []; $lists['off_pit'] = []; - $lists['count'] = db::name('vs_room_visitor')->where(['room_id' => $room_id])->count(); - $where = ['a.room_id' => $room_id]; - if ($page != 1) { - $where['a.is_onpit'] = 1;//不在麦位上的用户 - $where['b.hide_status'] = 0;//非隐身用户 - } + $where = ['a.room_id' => $room_id]; + $lists['count'] = db::name('vs_room_visitor')->where($where)->count(); $list = db::name('vs_room_visitor')->alias('a') ->join('user b', 'a.user_id = b.id','left') ->field('a.id,a.user_id,b.nickname,b.avatar,b.hide_status,a.is_onpit') ->where($where) -// ->order('a.is_onpit asc,a.id asc') ->page($page, $limit) ->select(); if ($list) { @@ -1837,7 +1832,12 @@ class Room extends Model $v['pit_number'] = $role['pit_number']; if ($page != 1) { - $lists['off_pit'][] = $v; +// $lists['off_pit'][] = $v; + if ($v['is_onpit'] == 1) {//bu在麦位上的用户 + if($v['hide_status'] == 0){//非隐身用户 + $lists['off_pit'][] = $v; + } + } } else { if ($v['is_onpit'] == 1) {//bu在麦位上的用户 if($v['hide_status'] == 0){//非隐身用户