fix(frontend): serve zone detail static export fallback

This commit is contained in:
ryan
2026-07-12 18:50:13 +08:00
parent 50717d1baf
commit c624512da6
11 changed files with 167 additions and 29 deletions
+10 -1
View File
@@ -101,7 +101,16 @@ func init() {
}
}
// 4. 单页应用(SPA)前端路由兜底:返回 index.html
// 4. Next.js static export dynamic route fallback. Runtime IDs cannot be
// enumerated at build time, so serve the generated route shell instead of
// falling back to the dashboard index.html.
if fallbackPath, ok := resolveNextExportDynamicFallback(subFS, cleanPath); ok {
if serveFileDirect(c, subFS, fallbackPath) {
return
}
}
// 5. 单页应用(SPA)前端路由兜底:返回 index.html
if serveFileDirect(c, subFS, "index.html") {
return
}