Files
shanxia2.0/miniprogram/styles/db-theme.scss
T

313 lines
4.9 KiB
SCSS

/* 地磅模块局部主题 — 对齐 mobile-h5 Vant4 (#52B788) */
.db-page {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 80px;
box-sizing: border-box;
}
.db-header {
position: sticky;
top: 0;
z-index: 50;
background: #fff;
border-bottom: 1px solid #eee;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
height: var(--sq-header-height, calc(44px + 44px));
padding-top: var(--sq-safe-top, 44px);
box-sizing: border-box;
}
.db-header__nav {
height: var(--sq-nav-height, 44px);
display: grid;
grid-template-columns: minmax(0, 1fr) var(--sq-capsule-right-safe, 96px);
align-items: center;
padding: 0 12px 0 8px;
box-sizing: border-box;
}
.db-header__left {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
min-width: 0;
}
.db-header__back {
font-size: 20px;
color: #333;
padding: 4px 8px;
flex-shrink: 0;
}
.db-header__title {
font-size: 17px;
font-weight: 700;
color: #111827;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.db-search-wrap {
padding: 8px 12px 0;
background: #fff;
}
.db-filter-bar {
display: flex;
flex-wrap: wrap;
gap: 8px;
padding: 10px 16px 12px;
background: #fff;
}
.db-filter-chip {
padding: 6px 12px;
border-radius: 16px;
font-size: 13px;
color: #6b7280;
background: #f3f4f6;
}
.db-filter-chip--active {
color: #fff;
background: #52b788;
}
.db-list {
padding: 12px 16px;
}
.db-card {
background: #fff;
border-radius: 12px;
padding: 14px;
margin-bottom: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.db-card__head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.db-card__title {
font-size: 16px;
font-weight: 600;
color: #111827;
}
.db-card__row {
display: flex;
font-size: 13px;
line-height: 1.7;
color: #374151;
}
.db-card__label {
color: #6b7280;
min-width: 72px;
}
.db-card__foot {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #f3f4f6;
}
.db-fab {
position: fixed;
right: 20px;
bottom: calc(24px + env(safe-area-inset-bottom));
width: 52px;
height: 52px;
border-radius: 50%;
background: #52b788;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
box-shadow: 0 4px 12px rgba(82, 183, 136, 0.45);
z-index: 20;
}
.db-form-section {
margin: 16px;
background: #fff;
border-radius: 12px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.db-form-item {
margin-bottom: 20px;
}
.db-form-item:last-child {
margin-bottom: 0;
}
.db-form-label {
font-size: 14px;
font-weight: 500;
color: #333;
margin-bottom: 8px;
}
.db-form-label .req {
color: #ee0a24;
margin-left: 2px;
}
.db-form-value {
background: #f7f7f7;
border-radius: 8px;
padding: 12px 16px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: space-between;
}
.db-form-value .ph {
color: #c0c4cc;
}
.db-form-actions {
padding: 16px;
}
.db-stat-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
padding: 0 16px 16px;
}
.db-stat-card {
background: #fff;
border-radius: 16px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.db-stat-title {
font-size: 13px;
color: #6b7280;
margin-bottom: 8px;
}
.db-stat-value {
font-size: 28px;
font-weight: 700;
color: #111827;
}
.db-stat-suffix {
font-size: 14px;
color: #9ca3af;
margin-left: 4px;
}
.db-menu-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
padding: 16px 16px 16px;
}
.db-menu-item {
background: #fff;
border-radius: 12px;
padding: 12px 8px;
text-align: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.db-menu-icon {
font-size: 24px;
margin-bottom: 4px;
}
.db-menu-label {
font-size: 12px;
color: #111827;
font-weight: 500;
}
.db-chart-block {
margin: 0 16px 16px;
background: #fff;
border-radius: 12px;
padding: 14px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.db-chart-title {
font-size: 14px;
font-weight: 600;
color: #111827;
margin-bottom: 12px;
}
.db-bar-row {
margin-bottom: 10px;
}
.db-bar-label {
font-size: 12px;
color: #6b7280;
margin-bottom: 4px;
}
.db-bar-track {
height: 8px;
background: #f3f4f6;
border-radius: 4px;
overflow: hidden;
display: flex;
}
.db-bar-planned {
height: 100%;
background: #a7f3d0;
}
.db-bar-actual {
height: 100%;
background: #52b788;
}
.db-bar-meta {
font-size: 11px;
color: #9ca3af;
margin-top: 2px;
}
.db-empty {
padding: 48px 16px;
text-align: center;
color: #9ca3af;
font-size: 14px;
}
/* Vant Weapp 主色覆盖(地磅页内) */
.db-page {
--van-primary-color: #52b788;
--van-button-primary-background-color: #52b788;
--van-button-primary-border-color: #52b788;
}