diff --git a/static/hub.js b/static/hub.js index 3627156..d37c1df 100644 --- a/static/hub.js +++ b/static/hub.js @@ -207,17 +207,26 @@ function isLiquidityWeak(p) { if (!p) return false; - if (p.liquidity_ok === false || p.bid_invalid) return true; + // 仅明确残档/流动性不足时标黄;liquidity_ok==null 表示未同步,不标黄 + if (p.bid_invalid || p.liquidity_ok === false) return true; const uncovered = Number(p.uncovered_sheets); return Number.isFinite(uncovered) && uncovered > 0; } function bidLiquidityLine(p) { - if (p.bid_invalid || (p.bid_px == null && (p.bid_sz == null || p.bid_sz === ""))) { + const noBid = p.bid_px == null && (p.bid_sz == null || p.bid_sz === ""); + if (p.bid_invalid) { const reason = (p.bid_invalid_reason || "无买一/残档").toString(); const short = reason.length > 18 ? reason.slice(0, 18) + "…" : reason; return { text: short, weak: true }; } + if (noBid) { + // 已判定流动性不足 → 标黄;否则视为未同步,显示 — + if (p.liquidity_ok === false) { + return { text: "无买一", weak: true }; + } + return { text: "—", weak: false }; + } const px = fmtBidPx(p.bid_px); const sz = p.bid_sz != null ? String(p.bid_sz) : "—"; const uncovered = Number(p.uncovered_sheets);