diff --git a/__pycache__/prediction_api.cpython-310.pyc b/__pycache__/prediction_api.cpython-310.pyc index d0920a59..048e1438 100644 Binary files a/__pycache__/prediction_api.cpython-310.pyc and b/__pycache__/prediction_api.cpython-310.pyc differ diff --git a/prediction_api.py b/prediction_api.py index a00c7a74..aa2988fc 100644 --- a/prediction_api.py +++ b/prediction_api.py @@ -209,6 +209,12 @@ def init_prediction_api(db, beijing_now): query = query.order_by(desc(PredictionTopic.views_count)) elif sort_by == 'participants': query = query.order_by(desc(PredictionTopic.participants_count)) + elif sort_by == 'ending_soon': + # 即将截止:按截止时间升序,最快截止的在前面(只显示未结算的) + query = query.order_by(PredictionTopic.deadline.asc()) + elif sort_by == 'highest_pool': + # 奖池最高:按总奖池降序 + query = query.order_by(desc(PredictionTopic.total_pool)) else: query = query.order_by(desc(PredictionTopic.created_at)) diff --git a/src/views/Community/components/DynamicNews/layouts/MainlineTimelineView.js b/src/views/Community/components/DynamicNews/layouts/MainlineTimelineView.js index dafc14e3..389c17c9 100644 --- a/src/views/Community/components/DynamicNews/layouts/MainlineTimelineView.js +++ b/src/views/Community/components/DynamicNews/layouts/MainlineTimelineView.js @@ -523,7 +523,7 @@ const MainlineTimelineViewComponent = forwardRef( const [mainlineData, setMainlineData] = useState(null); const [expandedGroups, setExpandedGroups] = useState({}); // 概念级别选择: 'lv1' | 'lv2' | 'lv3' | 具体概念ID(如 L1_TMT, L2_AI_INFRA, L3_AI_CHIP) - const [groupBy, setGroupBy] = useState("lv2"); + const [groupBy, setGroupBy] = useState("lv3"); // 层级选项(从 API 获取) const [hierarchyOptions, setHierarchyOptions] = useState({ lv1: [], lv2: [], lv3: [] }); // 排序方式: 'event_count' | 'change_desc' | 'change_asc' diff --git a/src/views/Community/components/HeroPanel.js b/src/views/Community/components/HeroPanel.js index 94b925ce..6663b4b9 100644 --- a/src/views/Community/components/HeroPanel.js +++ b/src/views/Community/components/HeroPanel.js @@ -2056,10 +2056,44 @@ const DetailModal = ({ isOpen, onClose, selectedDate, ztDetail, events, loading fontSize="md" lineHeight="1.8" sx={{ - '& p': { mb: 4 }, + // 确保所有文本元素都使用浅色 + '& *': { color: 'inherit' }, + '& p': { mb: 4, color: 'whiteAlpha.900' }, '& h1, & h2, & h3': { color: 'gold', mb: 3 }, - '& ul, & ol': { pl: 6 }, - '& li': { mb: 2 }, + '& h4, & h5, & h6': { color: 'whiteAlpha.900', mb: 2 }, + '& ul, & ol': { pl: 6, color: 'whiteAlpha.900' }, + '& li': { mb: 2, color: 'whiteAlpha.900' }, + '& a': { color: 'cyan.300', textDecoration: 'underline' }, + '& strong, & b': { color: 'gold', fontWeight: 'bold' }, + '& em, & i': { color: 'whiteAlpha.800' }, + '& code': { + color: 'orange.300', + bg: 'whiteAlpha.100', + px: 1, + borderRadius: 'sm', + fontSize: 'sm', + }, + '& pre': { + bg: 'whiteAlpha.100', + p: 3, + borderRadius: 'md', + overflow: 'auto', + '& code': { bg: 'transparent', p: 0 }, + }, + '& blockquote': { + borderLeft: '3px solid', + borderColor: 'gold', + pl: 4, + ml: 0, + color: 'whiteAlpha.700', + fontStyle: 'italic', + }, + '& table': { + width: '100%', + '& th': { color: 'gold', borderBottom: '1px solid rgba(255,215,0,0.3)', p: 2 }, + '& td': { color: 'whiteAlpha.900', borderBottom: '1px solid rgba(255,255,255,0.1)', p: 2 }, + }, + '& hr': { borderColor: 'whiteAlpha.200', my: 4 }, }} > diff --git a/src/views/StockCommunity/components/PredictionMarket/index.tsx b/src/views/StockCommunity/components/PredictionMarket/index.tsx index 8d513137..414c32f6 100644 --- a/src/views/StockCommunity/components/PredictionMarket/index.tsx +++ b/src/views/StockCommunity/components/PredictionMarket/index.tsx @@ -85,10 +85,10 @@ const PredictionMarket: React.FC = () => { } const response = await getTopics({ - status: filterBy === 'all' ? undefined : filterBy, - sort: sortBy, + status: filterBy === 'all' ? '' : filterBy, + sort_by: sortBy === 'latest' ? 'created_at' : sortBy, page: 1, - pageSize: 30, + per_page: 30, }); if (response.success) {