From 88df8762b0aef0e21ce905aa7015b498f20869fe Mon Sep 17 00:00:00 2001 From: zlt Date: Fri, 28 Aug 2026 16:02:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E7=A4=BA=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=EF=BC=9A=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B5=B0=20ParamStore=20=E7=9C=9F=E5=AE=9E=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=20get()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/publish_export.py | 7 ++++--- app/web/static/index.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/services/publish_export.py b/app/services/publish_export.py index 07d9ebf..fcab298 100644 --- a/app/services/publish_export.py +++ b/app/services/publish_export.py @@ -70,8 +70,9 @@ def compute_snapshot() -> dict: open_codes = sorted({r["ts_code"] for r in open_lots}) prices = market.get_prices(open_codes) if open_codes else {} - account = param_store.get_str("PMS_PUBLISH_ACCOUNT", "") - structure = param_store.get_str("PMS_PUBLISH_STRUCTURE", "") + # 字符串参数走通用 get() (ParamStore 没有 get_str; 类型按 RUNTIME_EXTRA 注册项转换) + account = str(param_store.get("PMS_PUBLISH_ACCOUNT") or "") + structure = str(param_store.get("PMS_PUBLISH_STRUCTURE") or "") holdings, price_missing = [], set() for r in open_lots: @@ -128,7 +129,7 @@ def compute_snapshot() -> dict: "open_room": round(openable - hold_cost, 2), "pos_ratio": round(hold_cost / openable, 4) if openable > 0 else None, "price_missing": sorted(price_missing), - "title": param_store.get_str("PMS_PUBLISH_TITLE", "量化产品基本信息"), + "title": str(param_store.get("PMS_PUBLISH_TITLE") or "量化产品基本信息"), } diff --git a/app/web/static/index.html b/app/web/static/index.html index 396cb24..6a50ff8 100644 --- a/app/web/static/index.html +++ b/app/web/static/index.html @@ -429,7 +429,7 @@ body.dock-r:not(.r-fold) .side-r .strip{display:none;} - + {{ autoRefresh ? '自动' : '手动' }} · {{ lastRefresh }}