From ff55a46b9d01c35f81245feb7dd7961ea6025827 Mon Sep 17 00:00:00 2001 From: hmo Date: Thu, 30 Jul 2026 17:57:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=9F=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96=E2=80=94=E2=80=94=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E4=B8=8D=E5=86=8D=E9=87=8D=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?=E8=BF=912=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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; }