diff --git a/src/views/Community/components/DynamicNewsCard.js b/src/views/Community/components/DynamicNewsCard.js index 2e6b8fdd..2d5406cd 100644 --- a/src/views/Community/components/DynamicNewsCard.js +++ b/src/views/Community/components/DynamicNewsCard.js @@ -21,6 +21,7 @@ import { import { TimeIcon } from '@chakra-ui/icons'; import EventScrollList from './DynamicNewsCard/EventScrollList'; import DynamicNewsDetailPanel from './DynamicNewsDetail'; +import UnifiedSearchBox from './UnifiedSearchBox'; import { fetchDynamicNews } from '../../../store/slices/communityDataSlice'; /** @@ -28,7 +29,11 @@ import { fetchDynamicNews } from '../../../store/slices/communityDataSlice'; * @param {Array} events - 事件列表 * @param {boolean} loading - 加载状态 * @param {Object} pagination - 分页信息 { page, per_page, total, total_pages } + * @param {Object} filters - 筛选条件 + * @param {Array} popularKeywords - 热门关键词 * @param {Date} lastUpdateTime - 最后更新时间 + * @param {Function} onSearch - 搜索回调 + * @param {Function} onSearchFocus - 搜索框获得焦点回调 * @param {Function} onEventClick - 事件点击回调 * @param {Function} onViewDetail - 查看详情回调 * @param {Object} ref - 用于滚动的ref @@ -37,7 +42,11 @@ const DynamicNewsCard = forwardRef(({ events, loading, pagination = {}, + filters = {}, + popularKeywords = [], lastUpdateTime, + onSearch, + onSearchFocus, onEventClick, onViewDetail, ...rest @@ -89,6 +98,16 @@ const DynamicNewsCard = forwardRef(({ 最后更新: {lastUpdateTime?.toLocaleTimeString() || '未知'} + + {/* 搜索和筛选组件 */} + + + {/* 主体内容 */} diff --git a/src/views/Community/index.js b/src/views/Community/index.js index 9ff47375..474fd2de 100644 --- a/src/views/Community/index.js +++ b/src/views/Community/index.js @@ -171,7 +171,11 @@ const Community = () => { events={dynamicNewsEvents} loading={dynamicNewsLoading} pagination={dynamicNewsPagination} + filters={filters} + popularKeywords={popularKeywords} lastUpdateTime={lastUpdateTime} + onSearch={updateFilters} + onSearchFocus={scrollToTimeline} onEventClick={handleEventClick} onViewDetail={handleViewDetail} />