diff --git a/ft-app/app/templates/contract.html b/ft-app/app/templates/contract.html index 19d92ae..11b2817 100644 --- a/ft-app/app/templates/contract.html +++ b/ft-app/app/templates/contract.html @@ -87,14 +87,15 @@ document.querySelectorAll('.amp-cell').forEach(function(cell) { // Only rows with data-index (skip header + next-day row) var dataRows = tbl.querySelectorAll('tr[data-index]'); var idx = parseInt(row.dataset.index); - if (idx < 5) return; + // Need 5 older rows (higher index, since newest first) + if (idx + 5 >= dataRows.length) return; document.getElementById('drawer-title').textContent = '{{ contract }}'; document.getElementById('drawer-date').textContent = '目标: ' + row.dataset.date + ' ' + row.dataset.weekday + ' 振幅 ' + cell.textContent.trim(); var html = '