diff --git a/backend/app/api/settings.py b/backend/app/api/settings.py index 4831dc9..ab88012 100644 --- a/backend/app/api/settings.py +++ b/backend/app/api/settings.py @@ -1292,7 +1292,7 @@ def update_email_smtp(req: EmailSmtpPrefsIn) -> dict: else req.password ) if username and not effective_password: - raise HTTPException(status_code=400, detail="已填写 SMTP 登录用户名,请同时填写密码或授权码") + raise HTTPException(status_code=400, detail="已填写 SMTP 登录用户名, 请同时填写密码或授权码") else: username = "" from_address = "" @@ -1353,9 +1353,9 @@ def test_webhook(req: WebhookTestIn) -> dict: elif req.channel == "custom": url = preferences.get_custom_webhook_url() if not url: - return {"ok": False, "detail": "尚未配置第三方 Webhook,请先保存"} + return {"ok": False, "detail": "尚未配置第三方 Webhook, 请先保存"} if not webhook_adapter.is_valid_custom_url(url): - return {"ok": False, "detail": "已保存的第三方 Webhook 地址非法,请重新保存"} + return {"ok": False, "detail": "已保存的第三方 Webhook 地址非法, 请重新保存"} ok = webhook_adapter.send_custom( url, title, @@ -1369,7 +1369,7 @@ def test_webhook(req: WebhookTestIn) -> dict: config = preferences.get_email_smtp_config() if not email_adapter.is_configured(config): - return {"ok": False, "detail": "尚未完整配置邮件 SMTP,请先保存"} + return {"ok": False, "detail": "尚未完整配置邮件 SMTP, 请先保存"} ok = email_adapter.send_email( config, secrets_store.get_email_smtp_password(), @@ -1379,7 +1379,7 @@ def test_webhook(req: WebhookTestIn) -> dict: ) if ok: - return {"ok": True, "detail": "测试消息已发送,请检查对应接收端"} + return {"ok": True, "detail": "测试消息已发送, 请检查对应接收端"} return {"ok": False, "detail": "推送失败:网络不可达或地址/密钥不正确,详情见后端日志"} diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index ee261f8..a0f2938 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -177,18 +177,6 @@ export interface LevelSeries { atr?: { stop_loss: (number | null)[]; take_profit: (number | null)[] } } -export interface MainCostEstimate { - estimated_main_cost: number | null - main_cost_peak: number | null - main_core_cost_low: number | null - main_core_cost_high: number | null - /** 小数制:0.10 表示估算浮盈 10% */ - main_profit_rate: number | null - main_net_amount: number - /** 0~1,表示输入数据完整度,不是结果真实准确率 */ - confidence: number -} - export interface StockLevels { levels: Record close: number | null @@ -197,8 +185,6 @@ export interface StockLevels { /** dates 与 series 对齐;前端按自身 rows 的日期映射,缺失填 null */ dates?: string[] series?: LevelSeries - /** 疑似主力成本统计估算;旧后端响应可能不存在该字段 */ - main_cost?: MainCostEstimate } export interface AiStockReport {