diff --git a/frontend/m/js/pages.js b/frontend/m/js/pages.js
index 49cc544..e8b8b71 100644
--- a/frontend/m/js/pages.js
+++ b/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) {