perf: 性能优化与代码质量改进

- 简化ToastProvider组件,移除未使用导入
- 简化Stats页面代码
- 添加React ESLint配置
- 添加数据库索引和API参数验证
- 清理重复文件server.js.backup
- 移除前端未使用的UI代码和复杂样式

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-23 16:43:03 +08:00
co-authored by Claude Opus 4.6
parent 3975bbed73
commit 63c97ab31a
9 changed files with 43 additions and 859 deletions
+7
View File
@@ -7,6 +7,13 @@ export const formatMonth = (date) =>
export const formatMoney = (num) => (num || 0).toFixed(2);
// Format date as 'YYYY-MM-DD'
export const formatDate = (date) =>
`${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
// Get current time string 'HH:MM'
export const getCurrentTimeStr = () => new Date().toTimeString().slice(0, 5);
// Parse date-time string 'YYYY-MM-DD HH:MM' into date and time parts
export const parseDateTime = (dateTimeStr) => {
if (!dateTimeStr) return { datePart: '', timePart: '00:00' };