diff --git a/static/index.html b/static/index.html index 7ee52d96..d638f0db 100644 --- a/static/index.html +++ b/static/index.html @@ -1931,14 +1931,24 @@ function renderResearch() { if (!el) return; el.innerHTML = '
' + '

📋 策略研究 — 版本迭代对比

' + - '' + '' + - '' + + '' + '' + '每版策略基于上一版归因分析迭代 · 点击行展开明细
' + '
加载中...
' + '
'; + // 恢复用户上次选择的周期(防自动刷新重置,2026-07-30老爸抓包) + const savedPt = window._btPeriodVal || '2y'; + const ptSel = document.getElementById('btPeriod'); + if (ptSel) ptSel.value = savedPt; + loadStrategyList(); +} + +function saveBtPeriod() { + const sel = document.getElementById('btPeriod'); + if (sel) window._btPeriodVal = sel.value; loadStrategyList(); } @@ -1946,7 +1956,7 @@ async function loadStrategyList() { const listEl = document.getElementById('strategyList'); try { const ptMap = {'1m':'1m','6m':'6m','1y':'1y','2y':'2y','5y':'5y'}; - const pt = ptMap[document.getElementById('btPeriod')?.value || '2y'] || '2y'; + const pt = ptMap[window._btPeriodVal || document.getElementById('btPeriod')?.value || '2y'] || '2y'; const resp = await fetch('/api/research/strategies?period_tag=' + pt); const data = await resp.json(); if (data.error) { listEl.innerHTML = '
' + data.error + '
'; return; }