diff --git a/LTEMvcApp/Views/Home/Logs.cshtml b/LTEMvcApp/Views/Home/Logs.cshtml index 29934f0..2311e8c 100644 --- a/LTEMvcApp/Views/Home/Logs.cshtml +++ b/LTEMvcApp/Views/Home/Logs.cshtml @@ -311,13 +311,14 @@ // 格式化日志条目为 HTML 字符串 function formatLogItem(log, index) { + // 时间戳是毫秒数,直接用于Date构造函数 const timestamp = new Date(log.timestamp).toISOString(); return `
${timestamp} ${log.layer} ${formatDirection(log.direction)} ${log.message} - ${log.info} + ${log.info || ''}
`; } @@ -351,10 +352,12 @@ detailPlaceholder.classList.add('d-none'); + const timestamp = new Date(log.timestamp).toISOString(); + const detailHtml = `
Timestamp
-
${new Date(log.timestamp).toISOString()}
+
${timestamp}
Layer
@@ -382,7 +385,7 @@
Info
-
${log.info}
+
${log.info || ''}
Data