fix(HEL-95): 复验四条整改——周期选项位置/池页默认排序/三处列表详情
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+17
-11
@@ -135,6 +135,12 @@
|
|||||||
return cfg || null;
|
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) {
|
function columnsFor(cfg) {
|
||||||
if (cfg.columns) return cfg.columns[state.popularitySource] || cfg.columns.combined;
|
if (cfg.columns) return cfg.columns[state.popularitySource] || cfg.columns.combined;
|
||||||
return cfg;
|
return cfg;
|
||||||
@@ -595,7 +601,7 @@
|
|||||||
state.popularity = null;
|
state.popularity = null;
|
||||||
state.popularitySource = "combined";
|
state.popularitySource = "combined";
|
||||||
state.calCursor = null;
|
state.calCursor = null;
|
||||||
state.sort = { key: "", dir: null };
|
state.sort = defaultSortForKey(key);
|
||||||
state.detail = null;
|
state.detail = null;
|
||||||
|
|
||||||
document.getElementById("m-view").classList.add("m-view-feature");
|
document.getElementById("m-view").classList.add("m-view-feature");
|
||||||
@@ -889,6 +895,11 @@
|
|||||||
const rawRows = history.rows || [];
|
const rawRows = history.rows || [];
|
||||||
const latest = rawRows.length ? rawRows[rawRows.length - 1] : null;
|
const latest = rawRows.length ? rawRows[rawRows.length - 1] : null;
|
||||||
|
|
||||||
|
const rangeTabs = [20, 40, 60].map(function (n) {
|
||||||
|
const active = state.sentimentRange === n;
|
||||||
|
return '<button class="m-range-tab' + (active ? " active" : "") + '" type="button" data-sentiment-range="' + n + '" aria-pressed="' + (active ? "true" : "false") + '">' + n + "日</button>";
|
||||||
|
}).join("");
|
||||||
|
|
||||||
let card = "";
|
let card = "";
|
||||||
if (latest) {
|
if (latest) {
|
||||||
const score = number(latest.score);
|
const score = number(latest.score);
|
||||||
@@ -908,19 +919,14 @@
|
|||||||
"</div>" +
|
"</div>" +
|
||||||
'<p class="m-sent-advice">' + escapeHtml(sentimentAdvice(latest.phase)) + "</p>" +
|
'<p class="m-sent-advice">' + escapeHtml(sentimentAdvice(latest.phase)) + "</p>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
'<div class="m-section-title">情绪趋势(近 ' + rawRows.length + " 日)</div>" +
|
'<div class="m-section-title">情绪趋势(近 ' + rawRows.length + ' 日)<span class="m-range-tabs">' + rangeTabs + "</span></div>" +
|
||||||
'<div class="m-chart-card">' + sentimentTrendChart(rawRows) + "</div>" +
|
'<div class="m-chart-card">' + sentimentTrendChart(rawRows) + "</div>" +
|
||||||
'<div class="m-section-title">五维分项</div>' +
|
'<div class="m-section-title">五维分项</div>' +
|
||||||
sentimentComponentList(components);
|
sentimentComponentList(components);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rangeTabs = [20, 40, 60].map(function (n) {
|
|
||||||
const active = state.sentimentRange === n;
|
|
||||||
return '<button class="m-range-tab' + (active ? " active" : "") + '" type="button" data-sentiment-range="' + n + '" aria-pressed="' + (active ? "true" : "false") + '">' + n + "日</button>";
|
|
||||||
}).join("");
|
|
||||||
|
|
||||||
scroll.innerHTML = card +
|
scroll.innerHTML = card +
|
||||||
'<div class="m-section-title">历史明细 <span class="m-range-tabs">' + rangeTabs + "</span></div>" +
|
'<div class="m-section-title">历史明细</div>' +
|
||||||
'<div class="m-table-wrap" id="m-sentiment-hist"></div>';
|
'<div class="m-table-wrap" id="m-sentiment-hist"></div>';
|
||||||
mountSortableTable("m-sentiment-hist", "market/sentiment/history", function () {
|
mountSortableTable("m-sentiment-hist", "market/sentiment/history", function () {
|
||||||
const raw = (state.sentimentHistory && state.sentimentHistory.rows) || [];
|
const raw = (state.sentimentHistory && state.sentimentHistory.rows) || [];
|
||||||
@@ -1130,7 +1136,7 @@
|
|||||||
body.innerHTML = metaLine + '<div class="m-table-wrap" id="m-rotation-members-table"></div>';
|
body.innerHTML = metaLine + '<div class="m-table-wrap" id="m-rotation-members-table"></div>';
|
||||||
mountSortableTable("m-rotation-members-table", "market/rotation/members", function () {
|
mountSortableTable("m-rotation-members-table", "market/rotation/members", function () {
|
||||||
return (state.rotationMembers && state.rotationMembers.rows) || [];
|
return (state.rotationMembers && state.rotationMembers.rows) || [];
|
||||||
}, { noLink: true });
|
}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----- 竞价 ----- */
|
/* ----- 竞价 ----- */
|
||||||
@@ -1342,7 +1348,7 @@
|
|||||||
'<div class="m-table-wrap" id="m-theme-members-table"></div>';
|
'<div class="m-table-wrap" id="m-theme-members-table"></div>';
|
||||||
mountSortableTable("m-theme-members-table", "market/themes/members", function () {
|
mountSortableTable("m-theme-members-table", "market/themes/members", function () {
|
||||||
return (state.themesDetail && state.themesDetail.members) || [];
|
return (state.themesDetail && state.themesDetail.members) || [];
|
||||||
}, { noLink: true });
|
}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----- 龙虎榜 ----- */
|
/* ----- 龙虎榜 ----- */
|
||||||
@@ -1487,7 +1493,7 @@
|
|||||||
"</div>",
|
"</div>",
|
||||||
{ detail: true }
|
{ 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) {
|
function totRow(label, value, cls) {
|
||||||
|
|||||||
Reference in New Issue
Block a user