feat: 大屏幕的页面
This commit is contained in:
parent
ca914355ba
commit
d88f64a87b
@ -300,6 +300,15 @@ WeatherApp.updateSummaryPanel = function(historyData, forecastData){
|
||||
const futureSum = [r1,r2,r3].reduce((s,v)=> s + (v!=null?Number(v):0), 0);
|
||||
if (elFuture) elFuture.textContent = `未来1~3小时降雨 ${fmt(futureSum)} 毫米`;
|
||||
|
||||
// 超过阈值(>0.4mm)触发 Summary 面板橙色预警样式
|
||||
try {
|
||||
const panel = document.getElementById('summaryPanel');
|
||||
if (panel) {
|
||||
if (futureSum > 0.4) panel.classList.add('alert-on');
|
||||
else panel.classList.remove('alert-on');
|
||||
}
|
||||
} catch {}
|
||||
|
||||
// --- 过去预报准确率(按小时分档 [0,5), [5,10), [10,∞))---
|
||||
const bucketOf = (mm)=>{
|
||||
if (mm==null || isNaN(Number(mm))) return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user