买一/流动性仅在残档或明确拉不到时标黄,未同步显示破折号。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-2
@@ -207,17 +207,26 @@
|
|||||||
|
|
||||||
function isLiquidityWeak(p) {
|
function isLiquidityWeak(p) {
|
||||||
if (!p) return false;
|
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);
|
const uncovered = Number(p.uncovered_sheets);
|
||||||
return Number.isFinite(uncovered) && uncovered > 0;
|
return Number.isFinite(uncovered) && uncovered > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bidLiquidityLine(p) {
|
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 reason = (p.bid_invalid_reason || "无买一/残档").toString();
|
||||||
const short = reason.length > 18 ? reason.slice(0, 18) + "…" : reason;
|
const short = reason.length > 18 ? reason.slice(0, 18) + "…" : reason;
|
||||||
return { text: short, weak: true };
|
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 px = fmtBidPx(p.bid_px);
|
||||||
const sz = p.bid_sz != null ? String(p.bid_sz) : "—";
|
const sz = p.bid_sz != null ? String(p.bid_sz) : "—";
|
||||||
const uncovered = Number(p.uncovered_sheets);
|
const uncovered = Number(p.uncovered_sheets);
|
||||||
|
|||||||
Reference in New Issue
Block a user