房间用户列表

This commit is contained in:
2025-12-09 20:03:50 +08:00
parent f1feaea496
commit 3d47b350bb

View File

@@ -1883,9 +1883,7 @@ class Room extends Model
}
} else {
// 第二页及以后:只显示麦下用户
// 计算偏移量:总偏移量 = (页码-1) * 每页数量 - 麦上用户数量
// 因为第一页包含了麦上用户,所以从第二页开始只需要麦下用户
$offset = ($page - 1) * $limit - $onPitCount;
$offset = ($page - 1) * $limit;
// 确保偏移量不会为负数
$offset = max(0, $offset);