Fix perp manual order watch_entry bug; slim dialog UI; nav shows 永期/期期.

Manual market_order was validated as watch (missing watch_entry=0). Collapse order calc into details, remove page head card, show mode name in nav.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 16:19:15 +08:00
parent 78b909761d
commit 7d29181a04
8 changed files with 177 additions and 61 deletions
+6 -2
View File
@@ -863,12 +863,16 @@ def register_hedge_plan_routes(app: Flask, cfg: dict[str, Any]) -> None:
body["leverage"] = 100
else:
body["leverage"] = int(cfg.get("alt_leverage") or 5)
# 以期权为主:策略启动=盯盘,不现场开仓
# 以期权为主:默认盯盘;手动下单(market_order)或 watch_entry=0 则现场开仓
if plan_type == "perp_options":
from lib.hedge_plan.hedge_plan_option_primary_lib import is_option_primary
market = body.get("market_order") in (True, 1, "1", "true", "yes", "on")
watch = body.get("watch_entry")
watch_on = watch in (None, "", True, 1, "1", "true", "yes", "on")
watch_off = watch in (False, 0, "0", "false", "no", "off")
watch_on = (not market) and (not watch_off) and (
watch in (None, "", True, 1, "1", "true", "yes", "on")
)
if is_option_primary(body) and watch_on:
if dry_run:
return jsonify(