feat: Implement initial FastAPI web map API for weather data processing and serving a static frontend.

This commit is contained in:
2569718930@qq.com
2026-03-04 19:12:00 +08:00
parent 36d438e811
commit d3ea4cd1bc
2 changed files with 20 additions and 5 deletions
+4 -2
View File
@@ -439,8 +439,10 @@ function renderHero(data) {
if (data.mgm?.temp != null) {
let mgmTimeStr = "";
if (data.mgm.time) {
const match = data.mgm.time.match(/T?(\d{2}:\d{2})/);
if (match) mgmTimeStr = ` @${match[1]}`;
if (data.mgm.time.includes(":")) {
const match = data.mgm.time.match(/T?(\d{2}:\d{2})/);
if (match) mgmTimeStr = ` @${match[1]}`;
}
}
parts.push(
`<span style="color:#eab308;font-weight:600;background:rgba(234, 179, 8, 0.1);padding:2px 8px;border-radius:12px;border:1px solid rgba(234, 179, 8, 0.3);">⭐ MGM 实测: ${data.mgm.temp}${sym}${mgmTimeStr}</span>`,