支持在线时间跨天并优化发布与筛选体验

允许在线时段 end 早于 start 表示跨天,统一展示「次日」文案;修复移动端价格区间清空后被 sessionStorage 回写;优化 PC/移动端在线时间控件密度与通栏展示。
This commit is contained in:
yml2213
2026-07-19 17:28:57 +08:00
parent 6450b31129
commit ae79550d78
12 changed files with 410 additions and 136 deletions
@@ -207,52 +207,127 @@
gap: 8px;
}
.online-time-field :deep(.van-field__control) {
min-height: 32px;
/* 在线时间:通栏紧凑布局,高度贴近其它 publish-field */
.online-time-block {
margin-bottom: 8px;
padding: 10px 12px;
border-radius: 8px;
background: #f8fafc;
}
.online-time-controls {
.online-time-head {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 8px;
}
.online-time-title {
display: flex;
align-items: center;
gap: 2px;
color: #30343a;
font-size: 13px;
font-weight: 600;
line-height: 1.2;
}
.online-time-title .req {
color: #ee0a24;
font-weight: 800;
}
.online-time-allday {
flex-shrink: 0;
min-height: 28px !important;
padding: 0 12px !important;
font-size: 12px !important;
}
.online-time-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
width: 100%;
}
.online-time-range {
.online-time-pick {
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 6px;
width: 100%;
min-width: 0;
}
.online-time-input {
flex: 1;
min-width: 0;
height: 32px;
padding: 0 10px;
min-height: 36px;
padding: 6px 10px;
border: 1px solid #e2e8f0;
border-radius: 999px;
background: #f8fafc;
color: #1e293b;
font-size: 13px;
font-weight: 600;
font-variant-numeric: tabular-nums;
background: #fff;
text-align: left;
cursor: pointer;
transition:
border-color 0.15s ease,
box-shadow 0.15s ease;
}
.online-time-input:focus {
outline: none;
.online-time-pick:active {
border-color: #ffb074;
background: #fff;
box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
}
.online-time-sep {
flex: 0 0 auto;
color: #94a3b8;
font-size: 12px;
.online-time-label {
display: flex;
align-items: center;
gap: 3px;
flex-shrink: 0;
color: #8a94a6;
font-size: 11px;
font-weight: 600;
line-height: 1.2;
}
.online-time-label em {
font-style: normal;
padding: 0 4px;
border-radius: 999px;
background: rgba(255, 106, 0, 0.1);
color: #ff6a00;
font-size: 10px;
font-weight: 800;
}
.online-time-pick strong {
min-width: 0;
color: #20242a;
font-size: 15px;
font-weight: 700;
font-variant-numeric: tabular-nums;
letter-spacing: 0.01em;
line-height: 1.2;
text-align: right;
}
.online-time-pick strong.placeholder {
color: #94a3b8;
font-size: 13px;
font-weight: 600;
}
.online-time-summary {
margin: 6px 0 0;
color: #64748b;
font-size: 11px;
font-weight: 500;
line-height: 1.35;
}
.online-time-hint {
margin: 6px 0 0;
color: #858c96;
font-size: 11px;
line-height: 1.45;
}
.level-panel {