滚动条样式更新

This commit is contained in:
2025-12-24 18:39:48 +08:00
parent 6f44b8210e
commit c98928f703
3 changed files with 12 additions and 3 deletions

View File

@@ -73,9 +73,11 @@ const apiRequest = async (url, options = {}) => {
export const eventService = {
getEvents: (params = {}) => {
// Filter out null, undefined, and empty strings (but keep 0 and false)
// Filter out null, undefined, empty strings, and internal fields (starting with _)
const cleanParams = Object.fromEntries(
Object.entries(params).filter(([_, v]) => v !== null && v !== undefined && v !== '')
Object.entries(params).filter(([key, v]) =>
v !== null && v !== undefined && v !== '' && !key.startsWith('_')
)
);
const query = new URLSearchParams(cleanParams).toString();
return apiRequest(`/api/events?${query}`);