style(home): 首页首屏重排与预约卡片精简

品牌行按胶囊按钮位置计算安全区,hero 改为眉题+双行标题+装饰图形;
预约卡片压到两行:日期与状态胶囊一行、服务与就诊人一行,状态复用记录页语气档;
「联系我们」入口并入「联系客服」。
This commit is contained in:
lik
2026-11-16 19:30:35 +08:00
parent cc3d6b40f3
commit 40d5b63527
4 changed files with 311 additions and 642 deletions
+36 -6
View File
@@ -1,6 +1,8 @@
const API = require('../../utils/api.js')
const { restoreLightNavigation } = require('../../utils/navigation.js')
const { parseDate } = require('../../utils/date.js')
const { ensureLogin } = require('../../utils/auth.js')
const { STATUS_MAP, resolveOrderStatus } = require('../../utils/order.js')
// 首页未完成预约预览:服务端按预约日期倒序,这里取一页后在本地正序,
// 让最近的一场排在最前。20 条覆盖常见未完成量;首页只展示最近三条,
@@ -33,6 +35,8 @@ const SERVICE_ORDER = [1, 2, 7, 3, 4, 5, 8, 6]
Page({
data: {
topbarStyle: '',
brandStyle: '',
escortServices: [], // 陪诊服务(来自后端,按 SERVICE_ORDER 展示)
pendingRecords: [], // 按预约时间正序的最近几条未完成预约,每条渲染成一张卡,最多 3 条
quickEntries: [{
@@ -58,8 +62,8 @@ Page({
},
{
id: 'contact',
name: '联系我们',
desc: '人工客服',
name: '联系客服',
desc: '',
icon: 'call',
url: '/pages/mine/contact',
// 第三张卡通栏排布(两列网格的 2+1),避免右下角孤零零半张卡
@@ -69,6 +73,7 @@ Page({
},
onLoad() {
this.updateNavigationLayout()
// 先用上次成功拉取的列表渲染宫格,避免首屏出现一块空白;
// 紧接着请求最新数据,回来后覆盖
const cached = getApp().getCachedServices()
@@ -78,7 +83,29 @@ Page({
this.loadServices()
},
onReady() {
// 自定义导航在视图就绪后再恢复一次,避免首帧沿用上一页的白色系统文字。
restoreLightNavigation()
},
updateNavigationLayout() {
try {
const info = wx.getWindowInfo ? wx.getWindowInfo() : wx.getSystemInfoSync()
const capsule = wx.getMenuButtonBoundingClientRect()
const statusBarHeight = Number(info.statusBarHeight) || 0
if (!(capsule.top >= statusBarHeight && capsule.height > 0 && capsule.left > 0)) return
const gap = capsule.top - statusBarHeight
this.setData({
topbarStyle: `padding-top: ${statusBarHeight}px; height: ${statusBarHeight + capsule.height + gap * 2}px;`,
brandStyle: `height: ${capsule.height + gap * 2}px; max-width: ${Math.max(0, capsule.left - 32)}px;`
})
} catch (err) {
console.warn('首页导航布局使用默认值', err)
}
},
onShow() {
restoreLightNavigation()
this.refreshPendingPreview()
// 同步自定义 tabBar 选中态(首页为第 0 项)
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
@@ -185,19 +212,22 @@ Page({
return sorted.slice(0, PENDING_PREVIEW_LIMIT).map((item) => this.formatPendingRecord(item))
},
// 单条只保留首页需要的四项:日期、就诊人、医院、服务项目。
// 日期只到「月-日」:首屏扫读时用户先判断是哪一天,周几和时段交给详情
// 预约摘要只给日期、服务、就诊人与状态;时间与医院由详情页承接。
// timeText 仍保留在数据里,供卡片 aria-label 朗读完整预约时间。
formatPendingRecord(item) {
const date = parseDate(item.schedule?.date)
const whenText = date
? `${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`
: '日期待定'
const status = STATUS_MAP[resolveOrderStatus(item)] || STATUS_MAP.pending
return {
id: item._id,
whenText,
patientName: item.patient?.name || '--',
hospitalName: item.hospital?.name || '--',
timeText: item.schedule?.startTime || '时间待定',
statusText: status.text,
statusTone: status.tone,
patientName: item.patient?.name || '待补充',
serviceName: item.escort?.serviceName || '陪诊服务'
}
},
+2
View File
@@ -1,5 +1,7 @@
{
"navigationStyle": "custom",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#FAF8F5",
"navigationBarTitleText": "暖橙陪诊",
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
+63 -104
View File
@@ -1,133 +1,96 @@
<view class="page-bg">
<view class="container">
<!-- 顶部品牌行:左侧橙底白色品牌 Logo(心形线稿)+ 品牌名 -->
<view class="topbar">
<view class="brand">
<view class="brand-mark">
<image class="brand-logo" src="/images/home-w.png" mode="aspectFit" />
</view>
<view class="topbar" style="{{topbarStyle}}">
<view class="brand" style="{{brandStyle}}">
<image class="brand-logo" src="/images/home-ink.png" mode="aspectFit" />
<text class="brand-name">暖橙陪诊</text>
</view>
</view>
<!-- ① 头部:大字标题 + 信任行 + 主 CTA + 未完成预约预览(仅有未完成预约时)。
信任行放在 CTA 正上方:用户决定「约不约」的那一刻最需要可信背书,
三项都可核对(谁来做 / 熟不熟流程 / 几个人服务),纯展示不点击;
「异地就医 / 陪同就医 / 就医代办」场景行已由本行替换——场景概括
由下方「陪诊服务」宫格承担,首屏不再重复一遍场景名 -->
<view class="hero">
<view class="hero-title">
<!-- 不用逗号断句:靠「暖橙强调 + 深墨正文」的色差自然切分两个短句 -->
<text class="hero-title-accent">专业陪诊</text>
<text class="hero-title-main">让就医更省心</text>
</view>
<!-- 信任行:三项信任背书一行小字,紧贴大标题、放在 CTA 上方。
主语各异(谁来做 / 熟不熟 / 几个人),三项同档、纯展示不点击;
不加底色与描边:它就是标题的补充说明,让纸面与下方实心 CTA 保持对比 -->
<view class="hero-trust-wrap">
<view class="hero-trust">
<text class="hero-trust-item">实名认证陪诊师</text>
<view class="hero-trust-sep"></view>
<text class="hero-trust-item">熟悉医院流程</text>
<view class="hero-trust-sep"></view>
<text class="hero-trust-item">1对1全程陪同</text>
<view class="hero-intro">
<text class="hero-eyebrow">专业陪诊 · 就医代办</text>
<view class="hero-title">
<text class="hero-title-main">让就医,</text>
<text class="hero-title-accent">多一份安心。</text>
</view>
<!-- 品牌图形只作装饰,不遮挡正文,不承担操作。 -->
<view class="hero-art" aria-hidden="true">
<view class="hero-orbit"></view>
<view class="hero-arch">
<image class="hero-art-logo" src="/images/home-ink.png" mode="aspectFit" />
</view>
<view class="hero-art-dot"></view>
</view>
</view>
<!-- 主行动按钮:通栏胶囊,直达服务列表(下单路径最短化) -->
<view class="hero-cta" bindtap="goToBooking">
<text class="hero-cta-text">立即预约</text>
<t-icon name="chevron-right" size="28rpx" color="#FFFFFF" />
</view>
<!-- 培训考证宣传横幅:紧跟主 CTA,承接陪诊师「培训 → 报名」这条 B 端路径。
与上方实心 CTA 区分:本块走浅橙面 + 描边(纸面上靠描边托形、去阴影),
右侧按钮用白底 + 暖橙环,不给首屏增加第二个实心橙色块。
整块可点,按钮是它的点击暗示;真正报名仍进宣传页再转报名页,不在此处直接开表单 -->
<view class="hero-promo" bindtap="goToTraining" hover-class="hero-promo-hover">
<view class="promo-mark">
<t-icon name="education" size="32rpx" color="#9B4508" />
</view>
<view class="promo-body">
<text class="promo-title">陪诊师培训考证</text>
<text class="promo-desc">医疗陪诊顾问(高级)证书</text>
</view>
<view class="promo-btn">
<text class="promo-btn-text">了解详情</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</view>
<!-- 未完成预约预览:不设卡头(无「未完成预约」标题、无数量、无「查看全部」),
每条预约单独一张卡,卡内给出日期 / 就诊人 / 医院 / 服务项目,最多 3 条。
不把全部未完成预约铺在首屏:首屏优先保住主 CTA 与服务入口,
第 4 条起由「常用功能 · 预约记录」承接,避免订单多的用户把首页压成清单页。
数据按预约时间正序取最近三条;无未完成预约时整块不渲染,新用户首屏不受影响 -->
<view class="pending-card" wx:for="{{ pendingRecords }}" wx:key="id" data-id="{{ item.id }}" bindtap="goToRecordDetail">
<!-- 一条预约压成一行:日期 · 就诊人 · 医院 · 服务项目。
四项之间用留白切分,不再插中点字符(全站分隔语言统一为留白 / 细竖线);
行内不换行,医院名过长时只省略医院,日期、就诊人和项目始终可见 -->
<view class="pending-line">
<text class="pending-when">{{ item.whenText }}</text>
<text class="pending-patient">{{ item.patientName }}</text>
<text class="pending-hospital">{{ item.hospitalName }}</text>
<text class="pending-service">{{ item.serviceName }}</text>
</view>
<view class="pending-arrow">
<t-icon name="chevron-right" size="26rpx" color="#6F655C" />
</view>
<button class="hero-cta" size="default" bindtap="goToBooking" hover-class="action-hover">
<text>立即预约</text>
<view class="cta-arrow"><t-icon name="chevron-right" size="32rpx" color="#FFFFFF" /></view>
</button>
<!-- 三项简短业务标签,不叠加宣传说明。 -->
<view class="hero-trust">
<view class="trust-item"><view class="trust-check"></view><text>实名认证陪诊师</text></view>
<view class="trust-item"><view class="trust-check"></view><text>熟悉就医流程</text></view>
<view class="trust-item"><view class="trust-check"></view><text>一对一陪同</text></view>
</view>
</view>
<!-- 预约摘要只保留日期、服务、就诊人与状态,时间与医院进详情页。 -->
<view class="pending-section" wx:if="{{pendingRecords.length}}">
<text class="pending-heading">当前预约</text>
<view class="pending-card" wx:for="{{pendingRecords}}" wx:key="id" data-id="{{item.id}}" bindtap="goToRecordDetail" hover-class="surface-hover" aria-role="button" aria-label="{{item.whenText}} {{item.timeText}},{{item.serviceName}},{{item.statusText}},查看预约详情">
<view class="pending-content">
<view class="pending-top">
<text class="pending-when">{{item.whenText}}</text>
<view class="pending-status chip-tone-{{item.statusTone}}">{{item.statusText}}</view>
</view>
<view class="pending-meta">
<text class="pending-service">{{item.serviceName}}</text>
<text class="pending-patient">就诊人:{{item.patientName}}</text>
</view>
</view>
<t-icon name="chevron-right" size="30rpx" color="#6F655C" />
</view>
</view>
<!-- ② 陪诊服务:宫格紧贴标题,保证「标题 → 可点服务」路径最短。
信任背书已上提到首屏 CTA 上方,此处不再另设介绍卡 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">陪诊服务</text>
</view>
<view class="assist-card">
<view class="assist-grid">
<view class="assist-item" wx:for="{{ escortServices }}" wx:key="id" data-id="{{ item.id }}" bindtap="goToServiceDetail">
<!-- 圆润双色调图标:图形由 index.wxss 内嵌 SVG 提供,类名后缀是服务 id。
浅橙填色收在主体内部,不额外加衬底方块 -->
<view class="assist-icon {{ item.iconClass }}"></view>
<text class="assist-name">{{ item.name }}</text>
</view>
<view class="assist-grid">
<view class="assist-item" wx:for="{{escortServices}}" wx:key="id" data-id="{{item.id}}" bindtap="goToServiceDetail" hover-class="surface-hover" aria-role="button" aria-label="{{item.name}}">
<view class="assist-icon {{item.iconClass}}"></view>
<text class="assist-name">{{item.name}}</text>
</view>
</view>
</view>
<!-- ③ 常用功能:双列入口卡(未完成预约预览已上移到首屏主 CTA 下方) -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">常用功能</text>
</view>
<view class="quick-list">
<view class="quick-item {{ item.full ? 'quick-item-full' : '' }}" wx:for="{{ quickEntries }}" wx:key="id" data-item="{{ item }}" bindtap="onQuickEntryTap">
<!-- 入口统一走暖橙 + 浅橙衬底,不做色相区分;带 full 标记的卡通栏排布 -->
<view class="quick-icon">
<t-icon name="{{ item.icon }}" size="34rpx" color="#9B4508" />
<view class="quick-item {{item.full ? 'quick-item-full' : ''}}" wx:for="{{quickEntries}}" wx:key="id" data-item="{{item}}" bindtap="onQuickEntryTap" hover-class="surface-hover" aria-role="button" aria-label="{{item.name}}">
<view class="quick-top">
<view class="quick-icon">
<t-icon name="{{item.icon}}" size="38rpx" color="#9B4508" />
</view>
<text class="quick-name">{{item.name}}</text>
</view>
<view class="quick-info">
<text class="quick-name">{{ item.name }}</text>
<text class="quick-desc">{{ item.desc }}</text>
</view>
<!-- 每张卡都补右侧箭头:两列卡不再是"无暗示的整卡可点",
通栏卡同时填补右半空白 -->
<view class="quick-arrow">
<t-icon name="chevron-right" size="28rpx" color="#6F655C" />
<view class="quick-info" wx:if="{{item.desc}}">
<text class="quick-desc">{{item.desc}}</text>
</view>
<view class="quick-arrow"><t-icon name="chevron-right" size="28rpx" color="#6F655C" /></view>
</view>
</view>
</view>
<!-- ④ 页脚:B 端合作入口(商务合作 / 陪诊师入驻 / 陪诊师考证),
三条都进「合作与入驻」页,各自用 section 定位到对应卡片。
该页底部再转「联系我们」——咨询出口只保留一个,避免同一意图两个入口 -->
<!-- 培训与预约分区,保留入口但不打断就医服务主线。 -->
<view class="training-entry" bindtap="goToTraining" hover-class="surface-hover" aria-role="button" aria-label="了解陪诊师培训考证">
<view class="training-mark" aria-hidden="true"><view class="training-mark-line"></view></view>
<text class="training-title">陪诊师培训与考证</text>
<t-icon name="chevron-right" size="36rpx" color="#9B4508" />
</view>
<view class="page-footer">
<view class="footer-links">
<text class="footer-link" data-section="sec-biz" bindtap="goToBusiness">商务合作</text>
@@ -136,11 +99,7 @@
<view class="footer-sep"></view>
<text class="footer-link" data-section="sec-train" bindtap="goToBusiness">陪诊师考证</text>
</view>
<text class="footer-note">用心陪好每一步</text>
</view>
<!-- 底部留白 -->
<view class="footer-space"></view>
</view>
</view>
+210 -532
View File
@@ -1,581 +1,259 @@
@import "../../styles/service-icons.wxss";
/* ===== 首页 · 暖白纸面 × 单一暖橙(按参考图设计语言重做) =====
参考图要点:
- 暖白纸面 + 纯白圆角卡片 + 米色发丝边,阴影极轻,几乎只靠留白分层
- 单一暖橙主色:实心按钮/标识走深一档,浅橙衬底承载图标与标签
- 大量圆角方形衬底 + 彩色线图标
- 大字号标题直接落在纸面上,不用整块色面板压首屏 */
page {
/* 配色令牌已上移到 app.wxss(全站唯一来源,改配色只改那一处),本页不再留副本。
这里只把「未完成预约」的状态色指向 §三 的待确认档——全页唯一的冷色面。
语义由 DESIGN.md §3 管(只给「等你去处理」),且已登记为整卡底色的例外;
其余卡片仍走中性填充 */
--status-soft: var(--status-wait-bg);
--status-line: var(--status-wait-line);
/* 首页精修:纸面主视觉、白色服务面板、轻量工具卡。
装饰图形不承担内容;字号和色彩仍消费全局令牌。 */
.page-bg { min-height: 100vh; background: var(--paper); }
.container { padding: 0 32rpx 24rpx; }
.topbar { box-sizing: border-box; padding-top: 120rpx; }
.brand { display: flex; align-items: center; gap: 14rpx; }
.brand-logo { width: 48rpx; height: 48rpx; }
.brand-name {
color: var(--ink);
font-size: var(--fs-30);
font-weight: 600;
letter-spacing: 2rpx;
}
.page-bg {
min-height: 100vh;
background: var(--paper);
.hero { padding: 24rpx 0 12rpx; }
.hero-intro { position: relative; min-height: 218rpx; }
.hero-eyebrow {
position: relative;
z-index: 1;
color: var(--muted);
font-size: var(--fs-24);
letter-spacing: 2rpx;
}
.container {
padding: 0 32rpx 40rpx;
.hero-title {
position: relative;
z-index: 1;
width: 72%;
margin-top: 18rpx;
font-size: 60rpx;
font-weight: 600;
line-height: 1.35;
letter-spacing: 0;
}
/* ===== 顶部品牌行 ===== */
.topbar {
.hero-title-main, .hero-title-accent { display: block; }
.hero-title-main { color: var(--ink); }
.hero-title-accent { color: var(--brand-strong); }
.hero-art {
position: absolute;
top: 8rpx;
right: 8rpx;
width: 164rpx;
height: 196rpx;
pointer-events: none;
}
.hero-arch {
position: absolute;
top: 12rpx;
right: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 136rpx;
height: 176rpx;
border: 2rpx solid var(--brand-line);
border-radius: 90rpx 90rpx 28rpx 28rpx;
background: var(--brand-soft);
transform: rotate(8deg);
}
.hero-art-logo { width: 64rpx; height: 64rpx; opacity: 0.8; }
.hero-orbit {
position: absolute;
top: 0;
right: 0;
box-sizing: border-box;
width: 160rpx;
height: 192rpx;
border: 2rpx solid var(--sep);
border-radius: 100rpx 100rpx 40rpx 40rpx;
transform: rotate(-8deg);
}
.hero-art-dot { position: absolute; top: 4rpx; right: 6rpx; width: 12rpx; height: 12rpx; border: 6rpx solid var(--paper); border-radius: 50%; background: var(--brand-strong); }
/* v2 的 button 默认 :not([size]) 规则会压窄按钮;显式 size 并提高选择器优先级。 */
button.hero-cta[size="default"] {
display: flex;
align-items: center;
justify-content: space-between;
padding: 120rpx 0 0;
}
.brand {
display: flex;
align-items: center;
}
/* 品牌印记:实心暖橙圆角方块 + 白色品牌 Logo。
Logo 是白色线稿(心形 + 圆点)、透明底,必须压在有色底上才可见,
40rpx 是经真机像素验证后仍能辨认轮廓的最小尺寸 */
.brand-mark {
width: 56rpx;
height: 56rpx;
border-radius: 16rpx;
background: var(--brand-strong);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2rpx 8rpx rgba(184, 82, 10, 0.16);
}
.brand-logo {
width: 40rpx;
height: 40rpx;
}
.brand-name {
/* 30rpx:品牌字标是身份标识,不该和区块标题、主 CTA(均 34rpx)同重;
收一档让首屏层级落到「主标题 → 主 CTA / 区块标题 → 品牌名」。
不影响高度:品牌行高度由 56rpx 的 brand-mark 决定,字号改小不撑盒 */
font-size: var(--fs-30);
font-weight: 700;
color: var(--ink);
margin-left: 16rpx;
letter-spacing: 1rpx;
}
/* ===== ① 头部:大字标题直接落在纸面上 ===== */
/* 品牌行 → 大标题:40rpx 留白 + 50rpx 字。主标题是首屏第一视觉,
logo 与品牌名(30rpx)只做身份标识。
topbar 的 120rpx 保留用于微信胶囊/状态栏安全距,不作为视觉留白压缩 */
.hero {
padding: 40rpx 0 0;
}
.hero-title {
display: block;
/* 居中:与下方居中的信任条、通栏 CTA 共用一条视觉中轴,首屏呈海报式对称。
margin-left: 3rpx 补 letter-spacing 在末字后多留的那一份空白:
居中时墨迹中心会左偏 ls/2,左补一整份 ls 即回到正中 */
text-align: center;
margin-left: 3rpx;
/* 50rpx(25px) 在 WCAG"大字"门槛(18pt/24px)之上,橙色半句的 AA 结论不变。
与下方区块标题(34rpx)拉开 1.47×,首屏显重来源仍只此一处 */
font-size: 50rpx;
font-weight: 700;
letter-spacing: 3rpx;
/* 单行标题使用紧凑行高,减少上下附加空白。
保持 1.3(历史值):改 1.35 会让首屏多出 2.5rpx,
与「整体高度与历史版本一致」的要求冲突 */
line-height: 1.3;
}
/* 不用逗号断句:靠「暖橙强调 + 深墨正文」的色差切分两个短句。
两段合计 10 字 × (50rpx + 3rpx 字距) + 10rpx 间隔 ≈ 540rpx,
小于容器内宽 686rpx(750 - 32×2 页边距),不会折行 */
.hero-title-accent {
color: var(--brand-strong); /* 暖白纸面上 4.66:1,过 AA(50rpx/700 属大字,3:1 门槛之上) */
}
.hero-title-main {
color: var(--ink);
margin-left: 10rpx;
}
/* 信任行:三项背书放在主 CTA 上方,贴住大标题做标题的补充说明。
原场景行(异地就医 / 陪同就医 / 就医代办)由它替换:场景名与下方服务宫格
重复,而按下「立即预约」前更需要「谁来做 / 熟不熟流程 / 几个人服务」。
底色与胶囊描边已去掉:一行暖橙小字直接落在纸面上,
紧贴标题读作同一句的一部分,不与下方实心 CTA 争体量。
文字 --brand-ink(纸面 6.10:1,过 AA);整行不可点,靠右侧箭头缺位、
竖线分隔与通栏 CTA 的对比来区分「展示」与「行动」 */
.hero-trust-wrap {
/* 贴住标题,作为标题的补充说明。
26rpx:标题与副行各自独立成行,但仍读作同一组的收尾 */
margin-top: 24rpx;
text-align: center;
}
.hero-trust {
display: inline-flex;
align-items: center;
justify-content: center;
}
.hero-trust-item {
font-size: var(--fs-26);
font-weight: 700;
color: var(--brand-ink);
letter-spacing: 1rpx;
white-space: nowrap;
}
/* 竖分隔线:仅装饰,不承载信息。
纸面上用 --sep(#E5DACC):比 --line 深一档,暖白底上仍看得见 */
.hero-trust-sep {
width: 2rpx;
height: 20rpx;
margin: 0 24rpx;
background: var(--sep);
flex-shrink: 0;
}
/* 主行动按钮:通栏胶囊,直达服务列表。
与信任行保留适度间距,同时避免首屏被空白拉长 */
.hero-cta {
display: flex;
align-items: center;
justify-content: center;
/* 48rpx:CTA 要从「标题文案块」里独立出来,成为明确的可点行动 */
margin-top: 44rpx;
padding: 30rpx;
border-radius: 999rpx;
background: var(--brand-strong);
box-shadow: var(--shadow-cta);
transition: transform 0.15s ease;
}
.hero-cta:active {
transform: scale(0.98);
}
.hero-cta-text {
/* 34rpx / 17px:首屏唯一主行动,高于全站正文一档。
维持 34rpx(--fs-34)而不提到 36rpx:按钮盒高须与改前一致,
36rpx 文字会把胶囊撑高 2.4rpx,首屏整体高度就变了。
层级改由底色承担——实心橙底 vs 区块标题的纯文字,视觉权重已足够 */
font-size: var(--fs-34);
font-weight: 700;
color: var(--white);
letter-spacing: 2rpx;
margin-right: 6rpx;
/* 不设 line-height:走继承,改前也是这样,胶囊盒高与历史版本逐 rpx 一致 */
}
/* ===== 培训考证宣传横幅 =====
位置:主 CTA 正下方、未完成预约预览之前——它承接首屏的第二条路径
(陪诊师培训 → 报名),与「立即预约」构成「患者端 / 从业者端」两条入口。
配色:浅橙面 + 2rpx --brand-line 描边 + 24rpx 圆角 + 去阴影
(--brand-soft 落纸面只差约 1.03:1,托形全靠描边,配方同 .quick-item-full)。
内部按钮不再铺浅橙:白底 + 2rpx --brand-strong 环,既与浅橙底区分,
又保住非文本 3:1;全页实心橙仍只留给上方「立即预约」一处 */
.hero-promo {
display: flex;
align-items: center;
margin-top: 24rpx;
padding: 24rpx;
box-sizing: border-box;
width: 100%;
max-width: none;
min-height: 96rpx;
margin: 28rpx 0 0;
padding: 20rpx 28rpx;
border-radius: 24rpx;
background: var(--brand-soft);
border: 2rpx solid var(--brand-line);
transition: transform 0.15s ease;
background: var(--brand-strong);
color: var(--white);
font-size: var(--fs-32);
font-weight: 600;
line-height: 1.5;
text-align: left;
box-shadow: var(--shadow-cta);
}
.hero-promo:active,
.hero-promo-hover {
transform: scale(0.99);
}
/* 衬底方块走白面:浅橙底上再叠浅橙衬底等于没有衬底(同 .quick-item-full 的处理) */
.promo-mark {
width: 64rpx;
height: 64rpx;
border-radius: 18rpx;
background: var(--white);
border: 2rpx solid var(--brand-line);
.hero-cta::after { border: none; }
button.hero-cta.action-hover { background: var(--brand-ink); }
.cta-arrow { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48rpx; height: 48rpx; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.hero-trust {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.promo-body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
margin-left: 16rpx;
}
.promo-title {
font-size: var(--fs-30);
font-weight: 700;
color: var(--ink);
letter-spacing: 1rpx;
}
/* 浅橙底上的次要文字走 --muted(5.24:1,过 AA) */
.promo-desc {
margin-top: 6rpx;
font-size: var(--fs-24);
justify-content: space-between;
gap: 8rpx;
margin-top: 20rpx;
padding: 0 4rpx;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 按钮:白底 + 暖橙环。2rpx 细环已有 4.66:1,足以在白/浅橙两种底上托出轮廓;
字走 --brand-ink(白底 6.46:1),不用 --brand-strong 以免小字压线 */
.promo-btn {
display: flex;
align-items: center;
flex-shrink: 0;
margin-left: 12rpx;
padding: 12rpx 16rpx;
border-radius: 999rpx;
background: var(--white);
border: 2rpx solid var(--brand-strong);
}
.promo-btn-text {
margin-right: 4rpx;
/* 24rpx / 12px:按钮字收小一档,让「了解详情」退回附属提示的层级,
不与左侧标题争夺首屏注意力 */
font-size: var(--fs-24);
font-weight: 700;
color: var(--brand-ink);
letter-spacing: 1rpx;
/* 不设 line-height:走继承,改前也是这样,白底圆角钮的盒高与历史版本一致 */
line-height: 1.6;
}
/* 未完成预约预览:去掉卡头后,每条预约独立成一卡。
整卡铺淡绿状态底(status-soft)+ 2rpx status-line 描边,
与下方白卡服务宫格明显区分——返回用户一眼先看到「还有事没办完」。
浅色块落纸面靠描边托形、不加阴影(与浅橙介绍卡同一做法),
卡间距 20rpx(与 .quick-list 同档),三条叠成短清单而不连成一整块。
最多 3 条,第 4 条起由「常用功能 · 预约记录」承接;
只对未完成预约的用户渲染,新用户首屏不变 */
.trust-item { display: flex; align-items: center; gap: 10rpx; }
.trust-check { flex-shrink: 0; width: 12rpx; height: 7rpx; margin-top: -4rpx; border-bottom: 2rpx solid var(--brand-ink); border-left: 2rpx solid var(--brand-ink); transform: rotate(-45deg); }
.pending-section { padding: 4rpx 0; }
.pending-heading { color: var(--muted); font-size: var(--fs-26); }
.pending-card {
display: flex;
align-items: center;
margin-top: 20rpx;
/* 26rpx 24rpx(历史值):只统一横向,纵向留 26rpx,
改 24rpx 会让每张预约卡矮 4rpx,首屏高度随预约条数漂移 */
padding: 26rpx 24rpx;
border-radius: 24rpx;
background: var(--status-soft);
border: 2rpx solid var(--status-line);
/* 一条预约只占一行:行级 nowrap,避免任何一项被挤到第二行 */
white-space: nowrap;
}
.pending-card:active {
opacity: 0.7;
}
.pending-arrow {
display: flex;
align-items: center;
flex-shrink: 0;
margin-left: 12rpx;
}
/* 单行排完四项:日期 · 就诊人 · 医院 · 服务项目。
医院名可收缩省略,日期、就诊人、项目保持完整 */
.pending-line {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
/* 明确不换行:四段文字 + 三个分隔点始终保持在同一行,
放不下时由医院名收缩省略,其余项不折行 */
flex-wrap: nowrap;
white-space: nowrap;
overflow: hidden;
}
.pending-when {
font-size: var(--fs-26);
font-weight: 700;
color: var(--brand-ink); /* 淡绿底上 5.90:1,过 AA;整行唯一的暖橙强调 */
flex-shrink: 0;
white-space: nowrap;
}
/* 服务项按普通值处理:整行只在日期上留一处暖橙强调
(原先日期与服务项同色同重,一行两处橙色重音) */
.pending-service {
font-size: var(--fs-26);
font-weight: 700;
color: var(--ink);
flex-shrink: 0;
white-space: nowrap;
margin-left: 16rpx;
}
.pending-patient {
font-size: var(--fs-26);
font-weight: 700;
color: var(--ink);
flex-shrink: 0;
white-space: nowrap;
margin-left: 16rpx;
}
/* 医院名按内容宽度排,只有整行放不下时才收缩并省略;
与同行的日期/就诊人取同一档(26rpx)。色走 --ink-2 而非 --muted:
医院是"去哪儿"的决定性信息,不能比次要文字更浅 */
.pending-hospital {
flex: 0 1 auto;
min-width: 0;
margin-left: 16rpx;
font-size: var(--fs-26);
color: var(--ink-2);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ===== ② 陪诊服务:服务宫格 ===== */
/* ===== 通用区块 ===== */
.section {
margin-top: 56rpx;
}
.section-head {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 22rpx;
}
/* 区块标识:单竖条。原「实心橙方块 + 白图标」在页面上已是第三、四个橙色实心块,
与顶部品牌印记撞语言,且 26rpx 的白图标过小看不清;改竖条后视觉更轻,
把重心让给下方的服务宫格与功能卡。条高与 34rpx 标题齐平,避免细条显单薄 */
.section-bar {
width: 8rpx;
height: 34rpx;
border-radius: 4rpx;
background: var(--brand-strong);
flex-shrink: 0;
}
.section-title {
margin-left: 16rpx;
/* 34rpx / 17px(历史值,不动):区块标题若提到 36rpx,会同时
① 高过主 CTA 的 34rpx——标题反比主行动大,层级倒挂;
② 每处多撑 2rpx 行盒,两个区块合计 4rpx,页面总高与历史版本不一致。
层级改由下方卡名 32→30rpx 让位来建立(34 vs 30 = 1.13×) */
font-size: var(--fs-34);
font-weight: 700;
color: var(--ink);
letter-spacing: 1rpx;
}
/* 服务宫格:8 项服务白卡(区块主体,紧贴标题) */
.assist-card {
padding: 16rpx 8rpx 20rpx;
gap: 12rpx;
margin-top: 16rpx;
padding: 24rpx;
border: 2rpx solid var(--line);
border-radius: 28rpx;
background: var(--white);
border: 2rpx solid var(--line);
box-shadow: var(--shadow-card);
}
.pending-content { flex: 1; min-width: 0; }
/* 首行:日期居左强调,状态胶囊靠右;状态色只包文字本身 */
.pending-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
margin-bottom: 8rpx;
}
.pending-when { color: var(--brand-ink); font-size: var(--fs-30); font-weight: 600; white-space: nowrap; }
.pending-status {
display: inline-flex;
align-items: center;
flex-shrink: 0;
padding: 4rpx 16rpx;
border: 2rpx solid transparent;
border-radius: 10rpx;
font-size: var(--fs-24);
font-weight: 600;
line-height: 1.4;
white-space: nowrap;
}
/* 状态语气档与 recordlist / recorddetail 同一套,色值读 app.wxss 令牌 */
.chip-tone-wait { background: var(--status-wait-bg); border-color: var(--status-wait-line); color: var(--status-wait-ink); }
.chip-tone-doing { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-strong); }
.chip-tone-done { background: var(--status-done-bg); border-color: var(--status-done-line); color: var(--status-done-ink); }
.chip-tone-cancel { background: var(--status-cancel-bg); border-color: var(--status-cancel-line); color: var(--status-cancel-ink); }
.chip-tone-neutral { background: transparent; border-color: var(--sep); color: var(--muted); }
/* 第二行:服务名 + 就诊人同行;服务名过长时截断,就诊人完整保留 */
.pending-meta { display: flex; align-items: baseline; gap: 12rpx; min-width: 0; }
.pending-service {
min-width: 0;
overflow: hidden;
color: var(--ink);
font-size: var(--fs-28);
font-weight: 600;
line-height: 1.5;
text-overflow: ellipsis;
white-space: nowrap;
}
.pending-patient { flex-shrink: 0; color: var(--muted); font-size: var(--fs-24); line-height: 1.5; white-space: nowrap; }
.section { margin-top: 32rpx; }
.section-head {
margin-bottom: 16rpx;
padding: 0 4rpx;
}
.section-title { display: block; color: var(--ink); font-size: var(--fs-34); font-weight: 600; line-height: 1.5; }
.assist-grid {
display: flex;
flex-wrap: wrap;
padding: 12rpx 8rpx;
border: 2rpx solid var(--line);
border-radius: 28rpx;
background: var(--white);
box-shadow: var(--shadow-card);
}
/* 8 项服务:4 列 × 2 行正好排满 */
.assist-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 26rpx 0;
transition: transform 0.15s ease;
box-sizing: border-box;
width: 25%;
min-width: 0;
padding: 20rpx 2rpx;
border-radius: 16rpx;
}
.assist-item:active {
transform: scale(0.94);
}
/* 图标图形来自 styles/service-icons.wxss(与下单页、详情页共用),这里只声明宫格里的尺寸:
60rpx(30px) 兼顾真机清晰度与宫格留白,margin-bottom 隔开服务名 */
.assist-icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 20rpx;
}
/* 宫格项名 30rpx(15px):4 列列宽 ≈167rpx,
最长 5 字「出入院代办」= 150rpx,仍在列内,不折行、不溢出,无需 nowrap。
字重走 400 而非 500:中文系统字体只有 400/700 两档(与全站口径一致),
次级层级靠 --ink-2 的色阶表达,不用半档字重 */
.assist-name {
font-size: var(--fs-30);
font-weight: 700;
color: var(--ink-2);
/* 行高 1.5:字号 32→30 会让这一行的盒高少 2.8rpx,
用 1.5 把盒高补回 45rpx(≈改前 32rpx × normal),
宫格两行的总高与历史版本一致 */
line-height: 1.5;
}
/* ===== ④ 常用功能 ===== */
/* 双列卡片 + 图标左、文字右的横排结构;
第三张通栏卡靠换行落到第二行 */
.assist-icon { flex-shrink: 0; width: 56rpx; height: 56rpx; margin-bottom: 14rpx; }
.assist-name { color: var(--ink-2); font-size: var(--fs-28); line-height: 1.6; text-align: center; word-break: break-all; }
.quick-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
gap: 16rpx;
}
/* 图标左、文字右的横排结构 */
.quick-item {
flex: 1;
min-width: 0;
position: relative;
display: flex;
flex-direction: row;
align-items: center;
flex-direction: column;
width: calc((100% - 16rpx) / 2);
min-width: 0;
padding: 24rpx;
border-radius: 28rpx;
background: var(--white);
border: 2rpx solid var(--line);
box-shadow: var(--shadow-card);
transition: transform 0.15s ease;
}
.quick-item:active {
transform: scale(0.98);
}
/* 通栏卡(联系我们):两列网格 2+1 排布,第三张占满第二行。
必须显式 border-box:全局只有 .container 设了它,否则 width:100%
会再叠加自身 padding(24rpx×2) + 描边(2rpx×2),整卡溢出容器。
同时兼作页面尾部的落点:下半区(宫格、功能卡)全是"白卡 + 28rpx 深墨标题"的同一语言,
视线落下去找不到第二处落点,"上重下平"由此而来。
这里借用陪诊服务区块尾部的浅橙介绍卡语言,让每个区块都收在暖色卡上;
浅橙底本身已能与纸面区分,故去掉阴影,与介绍卡保持一致 */
.quick-item-full {
width: 100%;
flex: none;
border-radius: 24rpx;
background: var(--white);
box-sizing: border-box;
background: var(--brand-soft);
border-color: var(--brand-line);
box-shadow: none;
}
/* 浅橙衬底上不再叠浅橙衬底(同色叠同色等于没有衬底),让图标直接落在卡面上,
与陪诊服务宫格"图标不加衬底"的处理一致 */
.quick-item-full .quick-icon {
background: transparent;
}
/* 68 → 60rpx:两列卡右侧补了 chevron 后文字区被压缩,
衬底缩一档给 desc 让出宽度(60rpx/30px 仍在真机清晰区间内) */
.quick-icon {
width: 60rpx;
height: 60rpx;
border-radius: 18rpx;
background: var(--brand-soft);
.quick-top { display: flex; align-items: center; gap: 12rpx; min-width: 0; padding-right: 24rpx; }
.quick-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48rpx; height: 48rpx; border-radius: 14rpx; background: var(--brand-soft); }
.quick-arrow { position: absolute; top: 34rpx; right: 16rpx; display: flex; align-items: center; justify-content: center; }
.quick-info { min-width: 0; margin-top: 12rpx; }
.quick-name { color: var(--ink); font-size: var(--fs-30); font-weight: 600; line-height: 1.5; word-break: break-all; }
.quick-desc { display: block; color: var(--muted); font-size: var(--fs-24); line-height: 1.6; word-break: break-all; }
.quick-item-full { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8rpx 20rpx; width: 100%; min-height: 96rpx; padding: 22rpx 48rpx 22rpx 24rpx; background: var(--brand-soft); border-color: var(--brand-line); }
.quick-item-full .quick-top { padding-right: 0; }
.quick-item-full .quick-icon { background: transparent; }
.quick-item-full .quick-arrow { right: 16rpx; top: 50%; transform: translateY(-50%); }
.quick-item-full .quick-info { margin-top: 0; }
/* 低频职业培训入口下沉,与就医预约保持业务分区。 */
.training-entry {
display: flex;
align-items: center;
justify-content: center;
margin-right: 14rpx;
flex-shrink: 0;
}
.quick-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.quick-name {
/* 32rpx / 16px:卡名放大一号,作为可点入口的主标签。
文字区约 179rpx,最长「预约记录」4 字 128rpx 仍单行 */
font-size: var(--fs-32);
font-weight: 700;
color: var(--ink);
/* 行高 1.5:放大后靠行高补回视觉高度,卡片整体高度与历史版本一致 */
line-height: 1.5;
}
.quick-desc {
font-size: var(--fs-24);
color: var(--muted);
margin-top: 6rpx;
}
/* 每张卡右侧箭头:两列卡此前没有任何点击暗示,属于"无暗示的整卡可点",
与通栏卡不一致;补齐后三张卡语言统一,通栏卡同时填补右半空白 */
.quick-arrow {
margin-left: auto;
flex-shrink: 0;
display: flex;
align-items: center;
}
/* ===== ⑤ 页脚 ===== */
.page-footer {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 64rpx;
padding-top: 32rpx;
gap: 16rpx;
margin-top: 28rpx;
min-height: 88rpx;
padding: 20rpx 4rpx;
border-top: 2rpx solid var(--line);
}
/* B 端合作文字链:低调但可读,点击转服务电话 */
.footer-links {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
/* 文字只有 24rpx 高,用 padding 撑热区、等量负外边距抵消,不影响页脚原有行距 */
.training-mark { position: relative; flex-shrink: 0; width: 48rpx; height: 60rpx; border: 2rpx solid var(--sep); border-radius: 6rpx; background: var(--white); }
.training-mark::before, .training-mark::after { content: ''; position: absolute; left: 10rpx; right: 10rpx; height: 2rpx; background: var(--sep); }
.training-mark::before { top: 14rpx; }
.training-mark::after { top: 24rpx; }
.training-mark-line { position: absolute; left: 17rpx; bottom: 8rpx; width: 12rpx; height: 12rpx; border: 2rpx solid var(--brand-ink); border-radius: 50%; }
/* 单行入口:标题吸收余量,把 chevron 推到右边缘 */
.training-title { flex: 1; min-width: 0; margin: 0; color: var(--ink); font-size: var(--fs-28); font-weight: 600; line-height: 1.5; }
.surface-hover { background: var(--brand-soft); }
.page-footer { padding: 12rpx 0 0; text-align: center; }
.footer-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 4rpx; }
.footer-link {
padding: 16rpx 0;
margin: -16rpx 0;
font-size: var(--fs-24);
color: var(--muted); /* 纸面 5.28:1,过 AA 正文 */
letter-spacing: 1rpx;
}
.footer-link:active {
color: var(--brand-strong);
}
/* 细竖线分隔:替代原中点字符,避免一行多点 */
.footer-sep {
width: 2rpx;
height: 20rpx;
background: var(--faint); /* 仅作装饰分隔,不承载信息 */
margin: 0 24rpx;
}
.footer-note {
font-size: var(--fs-24);
display: inline-flex;
align-items: center;
min-height: 88rpx;
padding: 0 12rpx;
color: var(--muted);
letter-spacing: 2rpx;
font-size: var(--fs-24);
}
.footer-link:active { color: var(--brand-ink); }
.footer-sep { width: 2rpx; height: 16rpx; margin: 0 8rpx; background: var(--sep); }
.footer-space { height: calc(100rpx + env(safe-area-inset-bottom)); }
/* 自定义 tabBar 是 fixed 脱离文档流的,这里补足它的高度,否则页脚会被盖住 */
.footer-space {
height: calc(100rpx + env(safe-area-inset-bottom));
/* 大字或窄屏下装饰先退让,不能通过缩小正文换取排版。 */
@media (max-width: 340px) {
.hero-title { width: 100%; }
.hero-art { display: none; }
.hero-trust { flex-wrap: wrap; justify-content: flex-start; gap: 12rpx 24rpx; }
.quick-list { gap: 12rpx; }
.quick-item { width: 100%; }
.quick-item-full .quick-info { margin-top: 0; }
}