update pay ui

This commit is contained in:
2025-12-10 11:30:19 +08:00
parent 3c18605988
commit 5dcf1fa574

13
app.py
View File

@@ -7819,7 +7819,7 @@ def get_index_realtime(index_code):
})
except Exception as e:
logger.error(f"获取指数实时行情失败: {index_code}, 错误: {str(e)}")
app.logger.error(f"获取指数实时行情失败: {index_code}, 错误: {str(e)}")
return jsonify({
'success': False,
'error': str(e),
@@ -12589,7 +12589,7 @@ def get_hotspot_overview():
'is_v2': True,
})
except Exception as v2_err:
logger.debug(f"V2 表查询失败,使用旧表: {v2_err}")
app.logger.debug(f"V2 表查询失败,使用旧表: {v2_err}")
# Fallback: 查询旧表
if not use_v2:
@@ -12642,11 +12642,12 @@ def get_hotspot_overview():
'is_v2': False,
})
except Exception as old_err:
logger.debug(f"旧表查询也失败: {old_err}")
app.logger.debug(f"旧表查询也失败: {old_err}")
# 尝试批量获取概念名称
if alerts:
concept_ids = list(set(a['concept_id'] for a in alerts))
concept_names = {} # 初始化 concept_names 字典
try:
from elasticsearch import Elasticsearch
es_client = Elasticsearch(["http://222.128.1.157:19200"])
@@ -12663,7 +12664,7 @@ def get_hotspot_overview():
if alert['concept_id'] in concept_names:
alert['concept_name'] = concept_names[alert['concept_id']]
except Exception as e:
logger.warning(f"获取概念名称失败: {e}")
app.logger.warning(f"获取概念名称失败: {e}")
# 计算统计信息
day_high = max([d['price'] for d in index_timeline if d['price']], default=None)
@@ -12701,7 +12702,7 @@ def get_hotspot_overview():
except Exception as e:
import traceback
error_trace = traceback.format_exc()
logger.error(f"获取热点概览数据失败: {error_trace}")
app.logger.error(f"获取热点概览数据失败: {error_trace}")
return jsonify({
'success': False,
'error': str(e),
@@ -12805,7 +12806,7 @@ def get_concept_alerts():
except Exception as e:
import traceback
logger.error(f"获取概念异动列表失败: {traceback.format_exc()}")
app.logger.error(f"获取概念异动列表失败: {traceback.format_exc()}")
return jsonify({
'success': False,
'error': str(e)