This commit is contained in:
2026-06-12 15:54:40 +08:00
parent 0478674a55
commit 18f7c26539
7 changed files with 496 additions and 94 deletions

View File

@@ -14,6 +14,8 @@ import (
"net/http"
"os"
"path/filepath"
"hyapi-server/internal/shared/qyglreport"
)
func parseBuiltReport(data []byte) (map[string]interface{}, error) {
@@ -54,9 +56,7 @@ func renderPage(tmpl *template.Template, report map[string]interface{}, injectLi
return nil, err
}
var buf bytes.Buffer
if err := tmpl.Execute(&buf, map[string]interface{}{
"ReportJSON": template.JS(reportBytes),
}); err != nil {
if err := tmpl.Execute(&buf, qyglreport.PageTemplateData(template.JS(reportBytes))); err != nil {
return nil, err
}
b := buf.Bytes()