|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
<title>AI期货分析系统 - 多品种分析面板</title>
|
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/antd@5.12.8/dist/reset.css" rel="stylesheet">
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
* {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:root {
|
|
|
|
|
--bg-primary: #f0f2f5;
|
|
|
|
|
--bg-secondary: #ffffff;
|
|
|
|
|
--bg-tertiary: #f9fafb;
|
|
|
|
|
--text-primary: #333333;
|
|
|
|
|
--text-secondary: #666666;
|
|
|
|
|
--text-tertiary: #999999;
|
|
|
|
|
--border-color: #d9d9d9;
|
|
|
|
|
--header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
|
|
--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
|
|
|
--card-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body.dark-theme {
|
|
|
|
|
--bg-primary: #1a1a1a;
|
|
|
|
|
--bg-secondary: #2d2d2d;
|
|
|
|
|
--bg-tertiary: #3d3d3d;
|
|
|
|
|
--text-primary: #e0e0e0;
|
|
|
|
|
--text-secondary: #b0b0b0;
|
|
|
|
|
--text-tertiary: #808080;
|
|
|
|
|
--border-color: #444444;
|
|
|
|
|
--header-bg: linear-gradient(135deg, #334155 0%, #1e293b 100%);
|
|
|
|
|
--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
|
|
|
--card-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
|
|
|
background-color: var(--bg-primary);
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.container {
|
|
|
|
|
max-width: 1400px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
background: var(--header-bg);
|
|
|
|
|
color: white;
|
|
|
|
|
padding: 30px;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
box-shadow: var(--card-shadow);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header h1 {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header p {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.section {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
box-shadow: var(--card-shadow);
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.theme-toggle {
|
|
|
|
|
background: var(--bg-tertiary);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.theme-toggle:hover {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-container {
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
outline: none;
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-input:focus {
|
|
|
|
|
border-color: #1890ff;
|
|
|
|
|
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.panel-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
|
|
|
gap: 20px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.symbol-card {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
box-shadow: var(--card-shadow);
|
|
|
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
position: relative;
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.symbol-card:hover {
|
|
|
|
|
transform: translateY(-5px);
|
|
|
|
|
box-shadow: var(--card-hover-shadow);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.symbol-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.symbol-name {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.symbol-code {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: var(--text-tertiary);
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.price-info {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.current-price {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.direction-indicator {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 4px 12px;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.direction-up {
|
|
|
|
|
background-color: rgba(82, 196, 26, 0.1);
|
|
|
|
|
color: #52c41a;
|
|
|
|
|
border: 1px solid rgba(82, 196, 26, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.direction-down {
|
|
|
|
|
background-color: rgba(255, 77, 79, 0.1);
|
|
|
|
|
color: #ff4d4f;
|
|
|
|
|
border: 1px solid rgba(255, 77, 79, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.direction-sideways {
|
|
|
|
|
background-color: rgba(24, 144, 255, 0.1);
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
border: 1px solid rgba(24, 144, 255, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.analysis-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
|
gap: 15px;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.analysis-item {
|
|
|
|
|
background-color: var(--bg-tertiary);
|
|
|
|
|
padding: 12px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.analysis-label {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.analysis-value {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.win-rate {
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rollover-warning {
|
|
|
|
|
color: #fa8c16;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fund-flow {
|
|
|
|
|
color: #52c41a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hot-section {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
|
|
|
gap: 20px;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hot-subsection {
|
|
|
|
|
background: var(--bg-tertiary);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hot-subsection-title {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.favorite-btn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 8px;
|
|
|
|
|
right: 8px;
|
|
|
|
|
width: 20px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-tertiary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.favorite-btn:hover {
|
|
|
|
|
background-color: rgba(255, 77, 79, 0.1);
|
|
|
|
|
color: #ff4d4f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.favorite-btn.favorite {
|
|
|
|
|
background-color: rgba(255, 77, 79, 0.1);
|
|
|
|
|
color: #ff4d4f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
color: var(--text-tertiary);
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
margin-top: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.panel-grid {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.analysis-grid {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hot-section {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body class="dark-theme">
|
|
|
|
|
<div class="container">
|
|
|
|
|
<!-- 头部 -->
|
|
|
|
|
<div class="header">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<div>
|
|
|
|
|
<h1>AI期货分析系统</h1>
|
|
|
|
|
<p>基于DeepSeek大模型和量化分析算法的智能决策平台</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 主题切换 -->
|
|
|
|
|
<div style="text-align: right; margin-bottom: 20px;">
|
|
|
|
|
<button class="theme-toggle" onclick="toggleTheme()">切换主题</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% if data_unavailable %}
|
|
|
|
|
<div style="text-align: center; padding: 60px; background: var(--bg-secondary); border-radius: 12px; box-shadow: var(--card-shadow); border: 1px solid var(--border-color);">
|
|
|
|
|
<div style="font-size: 48px; margin-bottom: 20px;">⚠️</div>
|
|
|
|
|
<h2 style="font-size: 24px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px;">数据不可用</h2>
|
|
|
|
|
<p style="font-size: 16px; color: var(--text-secondary); margin-bottom: 32px;">{{ message }}</p>
|
|
|
|
|
<div style="display: flex; justify-content: center; gap: 16px;">
|
|
|
|
|
<a href="/" style="padding: 10px 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; text-decoration: none; border-radius: 6px; font-size: 14px; font-weight: 500;">重试</a>
|
|
|
|
|
<a href="javascript:location.reload()" style="padding: 10px 24px; background: var(--bg-tertiary); color: var(--text-primary); text-decoration: none; border-radius: 6px; font-size: 14px; font-weight: 500; border: 1px solid var(--border-color);">刷新</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
|
|
<!-- 自选关注模块 -->
|
|
|
|
|
<div class="section">
|
|
|
|
|
<div class="section-title">
|
|
|
|
|
自选关注
|
|
|
|
|
<div style="display: flex; align-items: center; gap: 16px;">
|
|
|
|
|
<span style="font-size: 14px; font-weight: 400; color: #666;">{{ selected_symbols_data | length }} 个品种</span>
|
|
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
|
|
<span style="font-size: 14px; color: #666; margin-right: 8px;">显示模式:</span>
|
|
|
|
|
<div style="display: flex; border: 1px solid #d9d9d9; border-radius: 4px; overflow: hidden;">
|
|
|
|
|
<button id="simpleModeBtn" onclick="switchDisplayMode('simple')" style="padding: 4px 12px; background: #f0f0f0; border: none; font-size: 14px; cursor: pointer; outline: none;">简约</button>
|
|
|
|
|
<button id="detailModeBtn" onclick="switchDisplayMode('detail')" style="padding: 4px 12px; background: white; border: none; font-size: 14px; cursor: pointer; outline: none;">详细</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% if selected_symbols_data %}
|
|
|
|
|
<div class="panel-grid">
|
|
|
|
|
{% for symbol_data in selected_symbols_data %}
|
|
|
|
|
<!-- 简约模式卡片 -->
|
|
|
|
|
<div class="symbol-card simple-mode" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'" style="display: block;">
|
|
|
|
|
<div class="favorite-btn favorite" onclick="event.stopPropagation(); removeFromFavorite('{{ symbol_data.symbol }}');">★</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' %}强多头
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' %}强空头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bullish' %}弱多头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bearish' %}弱空头
|
|
|
|
|
{% elif symbol_data.direction == 'bullish' %}多头
|
|
|
|
|
{% elif symbol_data.direction == 'bearish' %}空头
|
|
|
|
|
{% elif symbol_data.direction == 'neutral' %}中性
|
|
|
|
|
{% else %}{{ symbol_data.direction | capitalize }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="analysis-grid">
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">趋势强度</div>
|
|
|
|
|
<div class="analysis-value">{{ symbol_data.trend_strength }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 详细模式卡片 -->
|
|
|
|
|
<div class="symbol-card detail-mode" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'" style="display: none;">
|
|
|
|
|
<div class="favorite-btn favorite" onclick="event.stopPropagation(); removeFromFavorite('{{ symbol_data.symbol }}');">★</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' or symbol_data.direction == 'bullish' %}🟢 做多
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' or symbol_data.direction == 'bearish' %}🔴 做空
|
|
|
|
|
{% else %}⚪ 观望
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="analysis-grid">
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">胜率</div>
|
|
|
|
|
<div class="analysis-value">{{ symbol_data.win_rate }}%</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">趋势强度</div>
|
|
|
|
|
<div class="analysis-value">{{ symbol_data.trend_strength }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">周期</div>
|
|
|
|
|
<div class="analysis-value">{{ symbol_data.cycle }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">换月预警</div>
|
|
|
|
|
<div class="analysis-value warning">{{ symbol_data.rollover_warning }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">主力资金</div>
|
|
|
|
|
<div class="analysis-value fund-flow">{{ symbol_data.fund_flow }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
|
|
|
|
<div style="text-align: center; padding: 40px; color: #666;">
|
|
|
|
|
<p>暂无自选品种,可从下方品种列表中添加</p>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 热门交易品种展示模块 -->
|
|
|
|
|
<div class="section">
|
|
|
|
|
<div class="section-title">热门交易品种</div>
|
|
|
|
|
|
|
|
|
|
<div class="hot-section">
|
|
|
|
|
<!-- 成交量热门 -->
|
|
|
|
|
<div class="hot-subsection">
|
|
|
|
|
<div class="hot-subsection-title">成交量热门</div>
|
|
|
|
|
<div class="panel-grid">
|
|
|
|
|
{% for symbol_data in hot_symbols.volume %}
|
|
|
|
|
<div class="symbol-card" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'">
|
|
|
|
|
<div class="favorite-btn" onclick="event.stopPropagation(); addToFavorite('{{ symbol_data.symbol }}');">☆</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' %}强多头
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' %}强空头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bullish' %}弱多头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bearish' %}弱空头
|
|
|
|
|
{% elif symbol_data.direction == 'bullish' %}多头
|
|
|
|
|
{% elif symbol_data.direction == 'bearish' %}空头
|
|
|
|
|
{% elif symbol_data.direction == 'neutral' %}中性
|
|
|
|
|
{% else %}{{ symbol_data.direction | capitalize }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 振幅热门 -->
|
|
|
|
|
<div class="hot-subsection">
|
|
|
|
|
<div class="hot-subsection-title">振幅热门</div>
|
|
|
|
|
<div class="panel-grid">
|
|
|
|
|
{% for symbol_data in hot_symbols.amplitude %}
|
|
|
|
|
<div class="symbol-card" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'">
|
|
|
|
|
<div class="favorite-btn" onclick="event.stopPropagation(); addToFavorite('{{ symbol_data.symbol }}');">☆</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' %}强多头
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' %}强空头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bullish' %}弱多头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bearish' %}弱空头
|
|
|
|
|
{% elif symbol_data.direction == 'bullish' %}多头
|
|
|
|
|
{% elif symbol_data.direction == 'bearish' %}空头
|
|
|
|
|
{% elif symbol_data.direction == 'neutral' %}中性
|
|
|
|
|
{% else %}{{ symbol_data.direction | capitalize }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 涨速热门 -->
|
|
|
|
|
<div class="hot-subsection">
|
|
|
|
|
<div class="hot-subsection-title">涨速热门</div>
|
|
|
|
|
<div class="panel-grid">
|
|
|
|
|
{% for symbol_data in hot_symbols.speed %}
|
|
|
|
|
<div class="symbol-card" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'">
|
|
|
|
|
<div class="favorite-btn" onclick="event.stopPropagation(); addToFavorite('{{ symbol_data.symbol }}');">☆</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' %}强多头
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' %}强空头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bullish' %}弱多头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bearish' %}弱空头
|
|
|
|
|
{% elif symbol_data.direction == 'bullish' %}多头
|
|
|
|
|
{% elif symbol_data.direction == 'bearish' %}空头
|
|
|
|
|
{% elif symbol_data.direction == 'neutral' %}中性
|
|
|
|
|
{% else %}{{ symbol_data.direction | capitalize }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 所有品种的列表 -->
|
|
|
|
|
<div class="section">
|
|
|
|
|
<div class="section-title">所有品种</div>
|
|
|
|
|
|
|
|
|
|
<div class="search-container">
|
|
|
|
|
<input type="text" class="search-input" placeholder="搜索品种代码或名称" id="symbolSearch">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="panel-grid" id="allSymbolsGrid">
|
|
|
|
|
{% for symbol_data in all_symbols_data %}
|
|
|
|
|
<div class="symbol-card" onclick="window.location.href='/symbol/{{ symbol_data.symbol }}'">
|
|
|
|
|
<div class="favorite-btn" onclick="event.stopPropagation(); addToFavorite('{{ symbol_data.symbol }}');">☆</div>
|
|
|
|
|
<div class="symbol-header">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="symbol-name">{{ symbol_data.name }}</div>
|
|
|
|
|
<div class="symbol-code">{{ symbol_data.symbol }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="price-info">
|
|
|
|
|
<div class="current-price">{{ symbol_data.current_price }}</div>
|
|
|
|
|
<div class="direction-indicator
|
|
|
|
|
{% if symbol_data.direction == 'bullish' or symbol_data.direction == 'strong_bullish' or symbol_data.direction == 'weak_bullish' %}direction-up{% elif symbol_data.direction == 'bearish' or symbol_data.direction == 'strong_bearish' or symbol_data.direction == 'weak_bearish' %}direction-down{% else %}direction-sideways{% endif %}">
|
|
|
|
|
{% if symbol_data.direction == 'strong_bullish' %}强多头
|
|
|
|
|
{% elif symbol_data.direction == 'strong_bearish' %}强空头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bullish' %}弱多头
|
|
|
|
|
{% elif symbol_data.direction == 'weak_bearish' %}弱空头
|
|
|
|
|
{% elif symbol_data.direction == 'bullish' %}多头
|
|
|
|
|
{% elif symbol_data.direction == 'bearish' %}空头
|
|
|
|
|
{% elif symbol_data.direction == 'neutral' %}中性
|
|
|
|
|
{% else %}{{ symbol_data.direction | capitalize }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="analysis-grid">
|
|
|
|
|
<div class="analysis-item">
|
|
|
|
|
<div class="analysis-label">趋势强度</div>
|
|
|
|
|
<div class="analysis-value">{{ symbol_data.trend_strength }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<div class="footer">
|
|
|
|
|
<p>© 2024 AI期货分析系统 | 数据更新时间: {{ now() }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
// 获取当前时间
|
|
|
|
|
function now() {
|
|
|
|
|
const date = new Date();
|
|
|
|
|
return date.toLocaleString('zh-CN');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 添加到自选
|
|
|
|
|
function addToFavorite(symbol) {
|
|
|
|
|
fetch(`/api/selected/add/${symbol}`, {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then(response => response.json())
|
|
|
|
|
.then(data => {
|
|
|
|
|
alert('已添加到自选');
|
|
|
|
|
// 刷新页面以更新自选列表
|
|
|
|
|
window.location.reload();
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error('添加自选失败:', error);
|
|
|
|
|
alert('添加自选失败');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从自选中删除
|
|
|
|
|
function removeFromFavorite(symbol) {
|
|
|
|
|
fetch(`/api/selected/remove/${symbol}`, {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then(response => response.json())
|
|
|
|
|
.then(data => {
|
|
|
|
|
alert('已从自选中删除');
|
|
|
|
|
// 刷新页面以更新自选列表
|
|
|
|
|
window.location.reload();
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error('删除自选失败:', error);
|
|
|
|
|
alert('删除自选失败');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 切换显示模式
|
|
|
|
|
function switchDisplayMode(mode) {
|
|
|
|
|
const simpleCards = document.querySelectorAll('.simple-mode');
|
|
|
|
|
const detailCards = document.querySelectorAll('.detail-mode');
|
|
|
|
|
const simpleBtn = document.getElementById('simpleModeBtn');
|
|
|
|
|
const detailBtn = document.getElementById('detailModeBtn');
|
|
|
|
|
|
|
|
|
|
if (mode === 'simple') {
|
|
|
|
|
// 显示简约模式卡片,隐藏详细模式卡片
|
|
|
|
|
simpleCards.forEach(card => {
|
|
|
|
|
card.style.display = 'block';
|
|
|
|
|
});
|
|
|
|
|
detailCards.forEach(card => {
|
|
|
|
|
card.style.display = 'none';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 更新按钮样式
|
|
|
|
|
simpleBtn.style.background = '#f0f0f0';
|
|
|
|
|
detailBtn.style.background = 'white';
|
|
|
|
|
} else if (mode === 'detail') {
|
|
|
|
|
// 显示详细模式卡片,隐藏简约模式卡片
|
|
|
|
|
simpleCards.forEach(card => {
|
|
|
|
|
card.style.display = 'none';
|
|
|
|
|
});
|
|
|
|
|
detailCards.forEach(card => {
|
|
|
|
|
card.style.display = 'block';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 更新按钮样式
|
|
|
|
|
simpleBtn.style.background = 'white';
|
|
|
|
|
detailBtn.style.background = '#f0f0f0';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 搜索功能
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
const searchInput = document.getElementById('symbolSearch');
|
|
|
|
|
const symbolsGrid = document.getElementById('allSymbolsGrid');
|
|
|
|
|
|
|
|
|
|
if (searchInput && symbolsGrid) {
|
|
|
|
|
searchInput.addEventListener('input', function() {
|
|
|
|
|
const searchTerm = this.value.toLowerCase();
|
|
|
|
|
const symbolCards = symbolsGrid.querySelectorAll('.symbol-card');
|
|
|
|
|
|
|
|
|
|
symbolCards.forEach(card => {
|
|
|
|
|
const symbolName = card.querySelector('.symbol-name').textContent.toLowerCase();
|
|
|
|
|
const symbolCode = card.querySelector('.symbol-code').textContent.toLowerCase();
|
|
|
|
|
|
|
|
|
|
if (symbolName.includes(searchTerm) || symbolCode.includes(searchTerm)) {
|
|
|
|
|
card.style.display = 'block';
|
|
|
|
|
} else {
|
|
|
|
|
card.style.display = 'none';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 主题切换功能
|
|
|
|
|
function toggleTheme() {
|
|
|
|
|
const body = document.body;
|
|
|
|
|
if (body.classList.contains('dark-theme')) {
|
|
|
|
|
body.classList.remove('dark-theme');
|
|
|
|
|
localStorage.setItem('theme', 'light');
|
|
|
|
|
} else {
|
|
|
|
|
body.classList.add('dark-theme');
|
|
|
|
|
localStorage.setItem('theme', 'dark');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化主题
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
const savedTheme = localStorage.getItem('theme');
|
|
|
|
|
if (savedTheme === 'light') {
|
|
|
|
|
document.body.classList.remove('dark-theme');
|
|
|
|
|
} else {
|
|
|
|
|
document.body.classList.add('dark-theme');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 定时刷新数据
|
|
|
|
|
setInterval(() => {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}, 60000); // 每分钟刷新一次
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|