feat(home): 未完成预约改逐条单行预览并换淡绿卡

- 首屏主 CTA 下方列出最近 3 条未完成预约,按日期/时段正序
- 每条压成一行:日期 · 就诊人 · 医院 · 服务项目,日期只到月-日
- 卡面改淡绿状态底 + 描边、不加阴影,数量改实心青绿胶囊
- 删除常用功能区的待服务提醒条,介绍卡只留信任行
- DESIGN.md §三登记淡绿整卡为首页唯一例外
This commit is contained in:
lik
2026-11-03 11:15:57 +08:00
parent 71a065d7f8
commit f78025e935
4 changed files with 290 additions and 72 deletions
+170 -48
View File
@@ -7,11 +7,12 @@
page {
/* 配色令牌已上移到 app.wxss(全站唯一来源,改配色只改那一处),本页不再留副本。
这里只剩本页专属的一样:「待服务订单」提醒条的状态色——全页唯一的冷色,
语义由 DESIGN.md §3 管,不随主色走 */
这里只剩本页专属的一样:「未完成预约」预览卡的状态色——全页唯一的冷色面。
语义由 DESIGN.md §3 管(只给「等你去处理」),且已登记为整卡底色的例外;
其余卡片仍走中性填充 */
--status-soft: #ECF7F4;
--status-line: #C7E5DF;
--status-ink: #0F766E; /* #ECF7F4 上 5.0:1,过 AA 正文 */
--status-ink: #0F766E; /* #ECF7F4 上 5.0:1、白底 5.47:1,过 AA 正文 */
}
.page-bg {
@@ -166,14 +167,174 @@ page {
margin-right: 6rpx;
}
/* ===== ② 陪诊服务:服务宫格 + 品类介绍卡 ===== */
/* 未完成预约预览:整卡铺淡绿状态底(status-soft)+ 2rpx status-line 描边,
与下方白卡服务宫格明显区分——返回用户一眼先看到「还有事没办完」。
浅色块落纸面靠描边托形、不加阴影(与浅橙介绍卡同一做法),
否则会在暖白纸面上糊成一块。
数量仍留在卡头徽标里,正文最多 3 条,
避免订单多的用户把首屏压成清单页;第 4 条起交给「查看全部」。
只对未完成预约的用户渲染,新用户首屏不变 */
.pending-card {
margin-top: 24rpx;
padding: 20rpx 24rpx 8rpx;
border-radius: 24rpx;
background: var(--status-soft);
border: 2rpx solid var(--status-line);
}
/* 卡头:标题 + 数量胶囊 + 右对齐「查看全部」。
数量胶囊改实心状态色 + 白字:卡面已是淡绿,原来的同色胶囊会消失;
面积仍很小,状态色只落在数字上,不铺成第二块绿色 */
.pending-head {
display: flex;
align-items: center;
padding-bottom: 4rpx;
}
.pending-title {
font-size: 26rpx;
font-weight: 700;
color: var(--ink);
letter-spacing: 1rpx;
}
.pending-count {
margin-left: 10rpx;
padding: 2rpx 10rpx;
border-radius: 999rpx;
/* 实心状态色小胶囊:淡绿卡上白底胶囊对比只有 1.10:1,形同消失;
数量本身是「待办」的唯一状态数字,用实心反白最醒目,面积仍很小 */
background: var(--status-ink);
font-size: 24rpx;
font-weight: 700;
line-height: 1.2;
color: var(--white); /* 5.47:1,过 AA */
}
/* 「查看全部」沿用区块标题行右侧入口的点击热区做法:
24rpx 文字上下各补 12rpx,再用等量负外边距把卡头高度压回去 */
.pending-link {
display: flex;
align-items: center;
margin: -12rpx 0 -12rpx auto;
padding: 12rpx 0;
}
.pending-link:active {
opacity: 0.7;
}
.pending-link-text {
font-size: 24rpx;
color: var(--muted);
letter-spacing: 1rpx;
}
.pending-link-arrow,
.pending-arrow {
display: flex;
align-items: center;
flex-shrink: 0;
}
.pending-link-arrow {
margin-left: 4rpx;
}
.pending-arrow {
margin-left: 12rpx;
}
/* 行间发丝线:绿底上不能用暖米色 --line(会显脏),
改用同族的 --status-line;每条预约压成一行,整行可点,热区约 90rpx 高 */
.pending-sep {
height: 2rpx;
background: var(--status-line);
}
.pending-item {
display: flex;
align-items: center;
padding: 28rpx 0;
/* 一条预约只占一行:行级 nowrap,避免任何一项被挤到第二行 */
white-space: nowrap;
}
.pending-item:active {
opacity: 0.7;
}
/* 单行排完四项:日期 · 就诊人 · 医院 · 服务项目。
医院名可收缩省略,日期、就诊人、项目保持完整 */
.pending-line {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
/* 明确不换行:四段文字 + 三个分隔点始终保持在同一行,
放不下时由医院名收缩省略,其余项不折行 */
flex-wrap: nowrap;
white-space: nowrap;
overflow: hidden;
}
.pending-when {
font-size: 24rpx;
font-weight: 700;
color: var(--brand-ink); /* 淡绿底上 5.90:1,过 AA */
letter-spacing: 0.5rpx;
flex-shrink: 0;
white-space: nowrap;
}
/* 服务项用深一档的暖橙:--brand-strong 落淡绿底只有 4.51:1,贴线;
退到 --brand-ink 仍是暖橙同色阶,5.90:1,并与日期保持同一支强调色 */
.pending-service {
font-size: 24rpx;
font-weight: 700;
color: var(--brand-ink);
flex-shrink: 0;
white-space: nowrap;
}
.pending-patient {
font-size: 24rpx;
font-weight: 600;
color: var(--ink);
flex-shrink: 0;
white-space: nowrap;
}
.pending-dot {
margin: 0 8rpx;
font-size: 22rpx;
color: var(--muted);
flex-shrink: 0;
}
/* 医院名按内容宽度排,只有整行放不下时才收缩并省略;
24rpx muted 在淡绿底上 5.19:1,过 AA */
.pending-hospital {
flex: 0 1 auto;
min-width: 0;
font-size: 24rpx;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ===== ② 陪诊服务:服务宫格 + 信任条 ===== */
/* 介绍卡:整卡走浅橙衬底,位于宫格下方,是本区块的尾部视觉锚点;
宫格保持白卡安静语言、紧贴标题。
纯内容展示卡(不可点),指南入口在区块标题行右侧 */
纯内容展示卡(不可点),只承载信任行——原定位句是品牌比喻、
不解释具体服务,且与 hero「省心」重复,已去掉;
指南入口在区块标题行右侧 */
.intro-card {
display: flex;
flex-direction: column;
padding: 28rpx 26rpx;
align-items: center;
justify-content: center;
padding: 24rpx 26rpx;
/* 位于宫格下方,改为上间距;比原 20rpx 略大,与宫格拉开层级 */
margin-top: 24rpx;
border-radius: 28rpx;
@@ -181,20 +342,12 @@ page {
border: 2rpx solid var(--brand-line);
}
/* 介绍卡定位句:一句(14 字)读完全卡主旨,比信任行更深一档做层级,
浅橙底 9.2:1 过 AA */
.intro-desc {
font-size: 26rpx;
line-height: 1.6;
color: var(--ink-2);
}
/* 信任行:三项信任背书单行小字,从首屏下沉至此,
在用户开始了解服务时补上信任背书;位于定位句下方,拉开 16rpx */
在用户开始了解服务时补上信任背书;单行居中,作为区块收尾 */
.intro-trust {
display: flex;
align-items: center;
margin-top: 16rpx;
justify-content: center;
}
.intro-trust-item {
@@ -367,37 +520,6 @@ page {
}
/* ===== ④ 常用功能 ===== */
/* 全页唯一的状态色:这是唯一"需要用户行动"的信息,用它把视线钉住 */
.order-tip {
display: flex;
align-items: center;
padding: 22rpx 24rpx;
margin-bottom: 16rpx;
border-radius: 20rpx;
background: var(--status-soft);
border: 2rpx solid var(--status-line);
}
.order-tip:active {
opacity: 0.75;
}
.order-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: var(--status-ink);
margin-right: 14rpx;
flex-shrink: 0;
}
.order-tip-text {
flex: 1;
font-size: 28rpx;
font-weight: 700;
color: var(--status-ink);
}
/* 双列卡片 + 图标左、文字右的横排结构;
第三张通栏卡靠换行落到第二行 */
.quick-list {