feat: 优化商品洞察相关代码逻辑、新增性能优化 SQL 并更新前端样式

This commit is contained in:
Peter
2026-03-23 18:01:13 +08:00
parent 6f962d67a2
commit e37e69511f
9 changed files with 263 additions and 35 deletions

View File

@@ -36,7 +36,7 @@
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
}
@@ -302,6 +302,52 @@ body {
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
/* Chart header with optional controls */
.chart-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 1rem;
}
.chart-header h2 {
margin: 0;
}
/* Apple-style Segmented Control */
.segment-control {
display: inline-flex;
background: rgba(134, 134, 139, 0.08);
border-radius: 10px;
padding: 3px;
gap: 2px;
}
.segment-btn {
padding: 5px 16px;
border: none;
border-radius: 8px;
background: transparent;
color: var(--text-secondary);
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.25s ease;
font-family: inherit;
}
.segment-btn:hover {
color: var(--text-primary);
}
.segment-btn.active {
background: var(--text-primary);
color: var(--bg-base);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
/* Dashboard Grid */
.dashboard-grid {
display: flex;