From d7aadcb02c8157894e0ee5b464a491f7e1feb05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=BD=E5=B7=A5=E5=91=98?= <4846a27a-ba87-49c9-939d-7275f63efcc7@agents.multica.local> Date: Mon, 24 Aug 2026 21:05:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(HEL-95):=20=E5=A4=8D=E9=AA=8C=E5=9B=9B?= =?UTF-8?q?=E6=9D=A1=E6=95=B4=E6=94=B9=E2=80=94=E2=80=94=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E4=BD=8D=E7=BD=AE/=E6=B1=A0=E9=A1=B5?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F/=E4=B8=89=E5=A4=84?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: multica-agent --- app/frontend/m/js/pages.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/frontend/m/js/pages.js b/app/frontend/m/js/pages.js index 49cc544..e8b8b71 100644 --- a/app/frontend/m/js/pages.js +++ b/app/frontend/m/js/pages.js @@ -135,6 +135,12 @@ return cfg || null; } + function defaultSortForKey(key) { + if (key === "market/limit-up") return { key: "streak", dir: "desc" }; + if (key === "market/limit-down") return { key: "streak", dir: "desc" }; + return { key: "", dir: null }; + } + function columnsFor(cfg) { if (cfg.columns) return cfg.columns[state.popularitySource] || cfg.columns.combined; return cfg; @@ -595,7 +601,7 @@ state.popularity = null; state.popularitySource = "combined"; state.calCursor = null; - state.sort = { key: "", dir: null }; + state.sort = defaultSortForKey(key); state.detail = null; document.getElementById("m-view").classList.add("m-view-feature"); @@ -889,6 +895,11 @@ const rawRows = history.rows || []; const latest = rawRows.length ? rawRows[rawRows.length - 1] : null; + const rangeTabs = [20, 40, 60].map(function (n) { + const active = state.sentimentRange === n; + return '"; + }).join(""); + let card = ""; if (latest) { const score = number(latest.score); @@ -908,19 +919,14 @@ "" + '

' + escapeHtml(sentimentAdvice(latest.phase)) + "

" + "" + - '
情绪趋势(近 ' + rawRows.length + " 日)
" + + '
情绪趋势(近 ' + rawRows.length + ' 日)' + rangeTabs + "
" + '
' + sentimentTrendChart(rawRows) + "
" + '
五维分项
' + sentimentComponentList(components); } - const rangeTabs = [20, 40, 60].map(function (n) { - const active = state.sentimentRange === n; - return '"; - }).join(""); - scroll.innerHTML = card + - '
历史明细 ' + rangeTabs + "
" + + '
历史明细
' + '
'; mountSortableTable("m-sentiment-hist", "market/sentiment/history", function () { const raw = (state.sentimentHistory && state.sentimentHistory.rows) || []; @@ -1130,7 +1136,7 @@ body.innerHTML = metaLine + '
'; mountSortableTable("m-rotation-members-table", "market/rotation/members", function () { return (state.rotationMembers && state.rotationMembers.rows) || []; - }, { noLink: true }); + }, {}); } /* ----- 竞价 ----- */ @@ -1342,7 +1348,7 @@ '
'; mountSortableTable("m-theme-members-table", "market/themes/members", function () { return (state.themesDetail && state.themesDetail.members) || []; - }, { noLink: true }); + }, {}); } /* ----- 龙虎榜 ----- */ @@ -1487,7 +1493,7 @@ "", { detail: true } ); - mountSortableTable("m-dragon-ops-table", "market/dragon/operations", function () { return ops; }, { noLink: true }); + mountSortableTable("m-dragon-ops-table", "market/dragon/operations", function () { return ops; }, {}); } function totRow(label, value, cls) {