update pay ui

This commit is contained in:
2025-12-02 10:49:50 +08:00
parent 7708cb1a69
commit 9b16d9d162
3 changed files with 39 additions and 6 deletions

9
app.py
View File

@@ -7297,6 +7297,15 @@ def get_index_realtime(index_code):
从 index_minute 表获取最新的分钟数据
返回: 最新价、涨跌幅、涨跌额、开盘价、最高价、最低价、昨收价
"""
# 确保指数代码包含后缀ClickHouse 中存储的是带后缀的代码)
# 上证指数: 000xxx.SH, 深证指数: 399xxx.SZ
if '.' not in index_code:
if index_code.startswith('399'):
index_code = f"{index_code}.SZ"
else:
# 000开头的上证指数以及其他指数默认上海
index_code = f"{index_code}.SH"
client = get_clickhouse_client()
today = date.today()