增加新闻流量监测板块
This commit is contained in:
@@ -22,6 +22,7 @@ from main_force_ui import display_main_force_selector
|
||||
from sector_strategy_ui import display_sector_strategy
|
||||
from longhubang_ui import display_longhubang
|
||||
from smart_monitor_ui import smart_monitor_ui
|
||||
from news_flow_ui import display_news_flow_monitor
|
||||
|
||||
# 页面配置
|
||||
st.set_page_config(
|
||||
@@ -294,7 +295,7 @@ def main():
|
||||
if st.button("🏠 股票分析", width='stretch', key="nav_home", help="返回首页,进行单只股票的深度分析"):
|
||||
# 清除所有功能页面标志
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_sector_strategy', 'show_longhubang', 'show_portfolio', 'show_low_price_bull']:
|
||||
'show_sector_strategy', 'show_longhubang', 'show_portfolio', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -307,28 +308,28 @@ def main():
|
||||
if st.button("💰 主力选股", width='stretch', key="nav_main_force", help="基于主力资金流向的选股策略"):
|
||||
st.session_state.show_main_force = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_sector_strategy',
|
||||
'show_longhubang', 'show_portfolio', 'show_low_price_bull']:
|
||||
'show_longhubang', 'show_portfolio', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("🐂 低价擒牛", width='stretch', key="nav_low_price_bull", help="低价高成长股票筛选策略"):
|
||||
st.session_state.show_low_price_bull = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_sector_strategy',
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_small_cap', 'show_profit_growth']:
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_small_cap', 'show_profit_growth', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("📊 小市值策略", width='stretch', key="nav_small_cap", help="小盘高成长股票筛选策略"):
|
||||
st.session_state.show_small_cap = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_sector_strategy',
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_low_price_bull', 'show_profit_growth']:
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_low_price_bull', 'show_profit_growth', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("📈 净利增长", width='stretch', key="nav_profit_growth", help="净利润增长稳健股票筛选策略"):
|
||||
st.session_state.show_profit_growth = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_sector_strategy',
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_low_price_bull', 'show_small_cap']:
|
||||
'show_longhubang', 'show_portfolio', 'show_main_force', 'show_low_price_bull', 'show_small_cap', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -339,14 +340,21 @@ def main():
|
||||
if st.button("🎯 智策板块", width='stretch', key="nav_sector_strategy", help="AI板块策略分析"):
|
||||
st.session_state.show_sector_strategy = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_longhubang', 'show_portfolio', 'show_smart_monitor', 'show_low_price_bull']:
|
||||
'show_longhubang', 'show_portfolio', 'show_smart_monitor', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("🐉 智瞰龙虎", width='stretch', key="nav_longhubang", help="龙虎榜深度分析"):
|
||||
st.session_state.show_longhubang = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_sector_strategy', 'show_portfolio', 'show_smart_monitor', 'show_low_price_bull']:
|
||||
'show_sector_strategy', 'show_portfolio', 'show_smart_monitor', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("📰 新闻流量", width='stretch', key="nav_news_flow", help="新闻流量监测与短线指导"):
|
||||
st.session_state.show_news_flow = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_sector_strategy', 'show_portfolio', 'show_smart_monitor', 'show_low_price_bull', 'show_longhubang']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -357,21 +365,21 @@ def main():
|
||||
if st.button("📊 持仓分析", width='stretch', key="nav_portfolio", help="投资组合分析与定时跟踪"):
|
||||
st.session_state.show_portfolio = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_sector_strategy', 'show_longhubang', 'show_smart_monitor', 'show_low_price_bull']:
|
||||
'show_sector_strategy', 'show_longhubang', 'show_smart_monitor', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("🤖 AI盯盘", width='stretch', key="nav_smart_monitor", help="DeepSeek AI自动盯盘决策交易(支持A股T+1)"):
|
||||
st.session_state.show_smart_monitor = True
|
||||
for key in ['show_history', 'show_monitor', 'show_config', 'show_main_force',
|
||||
'show_sector_strategy', 'show_longhubang', 'show_portfolio', 'show_low_price_bull']:
|
||||
'show_sector_strategy', 'show_longhubang', 'show_portfolio', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
if st.button("📡 实时监测", width='stretch', key="nav_monitor", help="价格监控与预警提醒"):
|
||||
st.session_state.show_monitor = True
|
||||
for key in ['show_history', 'show_main_force', 'show_longhubang', 'show_portfolio',
|
||||
'show_config', 'show_sector_strategy', 'show_smart_monitor', 'show_low_price_bull']:
|
||||
'show_config', 'show_sector_strategy', 'show_smart_monitor', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -381,7 +389,7 @@ def main():
|
||||
if st.button("📖 历史记录", width='stretch', key="nav_history", help="查看历史分析记录"):
|
||||
st.session_state.show_history = True
|
||||
for key in ['show_monitor', 'show_longhubang', 'show_portfolio', 'show_config',
|
||||
'show_main_force', 'show_sector_strategy', 'show_low_price_bull']:
|
||||
'show_main_force', 'show_sector_strategy', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -389,7 +397,7 @@ def main():
|
||||
if st.button("⚙️ 环境配置", width='stretch', key="nav_config", help="系统设置与API配置"):
|
||||
st.session_state.show_config = True
|
||||
for key in ['show_history', 'show_monitor', 'show_main_force', 'show_sector_strategy',
|
||||
'show_longhubang', 'show_portfolio', 'show_low_price_bull']:
|
||||
'show_longhubang', 'show_portfolio', 'show_low_price_bull', 'show_news_flow']:
|
||||
if key in st.session_state:
|
||||
del st.session_state[key]
|
||||
|
||||
@@ -521,6 +529,11 @@ def main():
|
||||
display_portfolio_manager()
|
||||
return
|
||||
|
||||
# 检查是否显示新闻流量监测
|
||||
if 'show_news_flow' in st.session_state and st.session_state.show_news_flow:
|
||||
display_news_flow_monitor()
|
||||
return
|
||||
|
||||
# 检查是否显示环境配置
|
||||
if 'show_config' in st.session_state and st.session_state.show_config:
|
||||
display_config_manager()
|
||||
|
||||
Reference in New Issue
Block a user