style(escort): 服务详情页统一导航与加载态

导航栏改浅色纸面并补 t-loading,页首样式收口到新版字号与圆角档位;
医院选择改由组件弹层承载,删除页面内的锚点滚动;就诊人胶囊补同名提示,
免责协议、医院列表与登录状态失败各自兜底,不再整页空白。
This commit is contained in:
lik
2026-11-16 19:30:38 +08:00
parent 40d5b63527
commit 9701889b3e
4 changed files with 324 additions and 203 deletions
+132 -112
View File
@@ -1,10 +1,9 @@
<view class="page-bg">
<view class="container" wx:if="{{service.id}}">
<view class="container" wx:if="{{!pageLoading && !pageError && service.id}}">
<!-- 头部:短横色标 + 深墨标题。原顶部 420rpx 大图已去掉:
服务图在多条服务间复用同一张占位图,既分不出是哪项服务,又白占掉大半首屏 -->
<view class="page-header">
<view class="header-accent"></view>
<view class="title-row">
<text class="header-title">{{ service.title }}</text>
<view class="header-tag" wx:if="{{ service.tag }}">{{ service.tag }}</view>
@@ -26,7 +25,6 @@
<!-- 服务详情 -->
<view class="section section-first">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">服务详情</text>
</view>
<text class="detail-text">{{ service.description }}</text>
@@ -35,7 +33,6 @@
<!-- 注意事项:与指南页同一套圆点语言 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">注意事项</text>
</view>
<view class="dot-list">
@@ -52,7 +49,6 @@
<view class="tab-panel" wx:if="{{activeTab === 'flow'}}">
<view class="section section-first">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">服务流程</text>
</view>
<view class="step-list">
@@ -87,7 +83,7 @@
<view class="popup-mask {{showOrderPopup ? 'show' : ''}}" bindtap="closeOrderPopup"></view>
<!-- 下单弹窗 -->
<view class="popup-content {{showOrderPopup ? 'show' : ''}}">
<view class="popup-content booking-popup {{showOrderPopup ? 'show' : ''}}">
<view class="popup-header">
<text class="popup-title">确认预约信息</text>
<view class="popup-close" bindtap="closeOrderPopup" aria-role="button" aria-label="关闭预约弹窗">
@@ -95,126 +91,148 @@
</view>
</view>
<scroll-view class="popup-body" scroll-y scroll-into-view="{{popupScrollIntoView}}" scroll-with-animation>
<!-- 服务信息 -->
<view class="order-service-info">
<view class="order-service-mark">
<view class="assist-icon {{serviceIconClass}}"></view>
<scroll-view class="popup-body" scroll-y>
<!-- 01 陪诊项目:服务与价格只读确认,分组口径与预约页一致 -->
<view class="form-section">
<view class="form-section-head">
<text class="form-section-number">01</text>
<text class="form-section-title">陪诊项目</text>
</view>
<view class="order-service-text">
<text class="order-service-title">{{service.title}}</text>
<text class="order-service-price">¥{{service.price}}/次</text>
<view class="order-service-info">
<view class="order-service-mark">
<view class="assist-icon {{serviceIconClass}}"></view>
</view>
<view class="order-service-text">
<text class="order-service-title">{{service.title}}</text>
<text class="order-service-price">¥{{service.price}}/次</text>
</view>
</view>
<text class="service-fee-note">费用仅含人工服务费,不含就医、药品及快递费用。</text>
</view>
<!-- 选择就诊人:订单必须关联健康档案,就诊人信息全部由此带入 -->
<view class="order-row column">
<text class="order-label">选择就诊人</text>
<scroll-view class="patient-scroll" scroll-x wx:if="{{profiles.length > 0}}">
<view class="patient-chips">
<view class="patient-chip {{selectedProfileId === item._id ? 'active' : ''}}" wx:for="{{profiles}}" wx:key="_id"
data-id="{{item._id}}" bindtap="onSelectProfile">
<text class="patient-chip-name">{{item.name}}</text>
</view>
<view class="patient-chip patient-chip-add" bindtap="goToAddProfile" aria-role="button" aria-label="增加就诊人">
<t-icon name="add" size="28rpx" color="#9B4508" />
<text class="patient-chip-name">增加</text>
<!-- 02 就诊人信息:订单必须关联健康档案,就诊人信息全部由此带入 -->
<view class="form-section">
<view class="form-section-head">
<text class="form-section-number">02</text>
<text class="form-section-title">就诊人信息</text>
</view>
<view class="order-row column">
<text class="order-label">选择就诊人</text>
<scroll-view class="patient-scroll" scroll-x wx:if="{{profiles.length > 0}}">
<view class="patient-chips">
<view class="patient-chip {{selectedProfileId === item._id ? 'active' : ''}}" wx:for="{{profiles}}" wx:key="_id"
data-id="{{item._id}}" bindtap="onSelectProfile" aria-role="radio" aria-checked="{{selectedProfileId === item._id}}">
<view class="selection-check" wx:if="{{selectedProfileId === item._id}}"></view>
<view class="patient-chip-copy">
<text class="patient-chip-name">{{item.name}}</text>
<text class="patient-chip-note" wx:if="{{item.nameHint}}">{{item.nameHint}}</text>
</view>
</view>
<view class="patient-chip patient-chip-add" bindtap="goToAddProfile" aria-role="button" aria-label="增加就诊人">
<t-icon name="add" size="28rpx" color="#9B4508" />
<text class="patient-chip-name">增加</text>
</view>
</view>
</scroll-view>
<view class="add-profile-tip" wx:else bindtap="goToAddProfile">
<text class="add-profile-tip-text">还没有就诊人,去添加后可一键带入</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
</scroll-view>
<view class="add-profile-tip" wx:else bindtap="goToAddProfile">
<text class="add-profile-tip-text">还没有就诊人,去添加后可一键带入</text>
<t-icon name="chevron-right" size="24rpx" color="#9B4508" />
</view>
<view class="order-row">
<text class="order-label">联系电话</text>
<text class="order-value {{patientPhone ? '' : 'placeholder'}}">{{patientPhone || '请先选择就诊人'}}</text>
</view>
</view>
<!-- 就诊人姓名/电话:只读,与所选档案严格一致(要改就去「编辑就诊人」) -->
<view class="order-row">
<text class="order-label">就诊人姓名</text>
<text class="order-value {{patientName ? '' : 'placeholder'}}">{{patientName || '请先选择就诊人'}}</text>
<!-- 03 就诊安排 -->
<view class="form-section">
<view class="form-section-head">
<text class="form-section-number">03</text>
<text class="form-section-title">就诊安排</text>
</view>
<view class="order-row">
<text class="order-label">就诊省份</text>
<picker class="order-picker" mode="selector" range="{{provinces}}" value="{{provinceIndex}}" bindchange="onProvinceChange">
<view class="picker-value-wrap">
<text class="picker-value {{province ? '' : 'placeholder'}}">{{province || '请选择省份'}}</text>
<view class="picker-chevron"></view>
</view>
</picker>
</view>
<!-- 医院选择独立浮层,不改变预约弹窗的滚动位置。 -->
<view>
<hospital-select
label="就诊医院"
value="{{hospital}}"
options="{{hospitalOptions}}"
placeholder="请选择就诊医院"
disabled="{{submitting}}"
bindchange="onHospitalChange"
/>
</view>
<!-- 陪诊师性别要求:先隐藏,下单固定按「不限」提交(js 中 gender 默认值),恢复时取消注释
<view class="order-row">
<text class="order-label">陪诊师性别</text>
<picker class="order-picker" mode="selector" range="{{genderOptions}}" value="{{genderIndex}}" bindchange="onGenderChange">
<view class="picker-value-wrap">
<text class="picker-value {{gender ? '' : 'placeholder'}}">{{gender || '请选择性别要求'}}</text>
<view class="picker-chevron"></view>
</view>
</picker>
</view>
-->
<view class="order-row">
<text class="order-label">预约日期</text>
<picker class="order-picker" mode="date" value="{{appointmentDate}}" start="{{minAppointmentDate}}" bindchange="onDateChange">
<view class="picker-value-wrap">
<text class="picker-value {{appointmentDate ? '' : 'placeholder'}}">{{appointmentDate || '请选择预约日期'}}</text>
<view class="picker-chevron"></view>
</view>
</picker>
</view>
<!-- 预约时间:整点/半点一档,所有服务统一可选到 23:30 -->
<view class="order-row">
<text class="order-label">预约时间</text>
<picker class="order-picker" mode="selector" range="{{timeSlots}}" value="{{timeSlotIndex}}" bindchange="onTimeChange">
<view class="picker-value-wrap">
<text class="picker-value {{appointmentTime ? '' : 'placeholder'}}">{{appointmentTime || '请选择预约时间'}}</text>
<view class="picker-chevron"></view>
</view>
</picker>
</view>
</view>
<!-- 就诊人电话 -->
<view class="order-row">
<text class="order-label">联系电话</text>
<text class="order-value {{patientPhone ? '' : 'placeholder'}}">{{patientPhone || '请先选择就诊人'}}</text>
</view>
<!-- 04 补充信息:收货地址仅对快递/跑腿服务展示,随订单保存快照 -->
<view class="form-section">
<view class="form-section-head">
<text class="form-section-number">04</text>
<text class="form-section-title">补充信息</text>
<text class="form-section-optional">选填</text>
</view>
<view class="order-row column" wx:if="{{requiresAddress}}">
<text class="order-label">收货地址(选填)</text>
<textarea class="order-textarea" value="{{shippingAddress}}" placeholder="请输入省市区、街道门牌等完整收货地址" maxlength="200" placeholder-class="input-placeholder" bindinput="onShippingAddressChange" />
<text class="address-tip">收货人与联系电话使用所选就诊人信息</text>
</view>
<!-- 就诊省份 -->
<view class="order-row">
<text class="order-label">就诊省份</text>
<picker class="order-picker" mode="selector" range="{{provinces}}" value="{{provinceIndex}}" bindchange="onProvinceChange">
<view class="picker-value {{province ? '' : 'placeholder'}}">
{{province || '请选择省份'}}
</view>
</picker>
</view>
<!-- 就诊医院:自定义搜索选择,支持中文/拼音搜索与手动输入。
id 供弹窗滚动容器在展开下拉时定位,保证列表完整可见 -->
<view id="hospital-select-anchor">
<hospital-select
label="就诊医院"
value="{{hospital}}"
options="{{hospitalOptions}}"
placeholder="请选择就诊医院"
disabled="{{submitting}}"
auto-page-scroll="{{false}}"
bindopen="onHospitalOpen"
bindchange="onHospitalChange"
/>
</view>
<!-- 陪诊师性别要求:先隐藏,下单固定按「不限」提交(js 中 gender 默认值),恢复时取消注释
<view class="order-row">
<text class="order-label">陪诊师性别</text>
<picker class="order-picker" mode="selector" range="{{genderOptions}}" value="{{genderIndex}}" bindchange="onGenderChange">
<view class="picker-value {{gender ? '' : 'placeholder'}}">
{{gender || '请选择性别要求'}}
</view>
</picker>
</view>
-->
<!-- 预约日期 -->
<view class="order-row">
<text class="order-label">预约日期</text>
<picker class="order-picker" mode="date" value="{{appointmentDate}}" start="{{minAppointmentDate}}" bindchange="onDateChange">
<view class="picker-value {{appointmentDate ? '' : 'placeholder'}}">
{{appointmentDate || '请选择预约日期'}}
</view>
</picker>
</view>
<!-- 预约时间:整点/半点一档,所有服务统一可选到 23:30 -->
<view class="order-row">
<text class="order-label">预约时间</text>
<picker class="order-picker" mode="selector" range="{{timeSlots}}" value="{{timeSlotIndex}}" bindchange="onTimeChange">
<view class="picker-value {{appointmentTime ? '' : 'placeholder'}}">
{{appointmentTime || '请选择预约时间'}}
</view>
</picker>
</view>
<!-- 收货地址仅对快递/跑腿服务展示,随订单保存快照 -->
<view class="order-row column" wx:if="{{requiresAddress}}">
<text class="order-label">收货地址(选填)</text>
<textarea class="order-textarea" value="{{shippingAddress}}" placeholder="请输入省市区、街道门牌等完整收货地址" maxlength="200" placeholder-class="input-placeholder" bindinput="onShippingAddressChange" />
<text class="address-tip">收货人与联系电话使用所选就诊人信息</text>
</view>
<!-- 备注 -->
<view class="order-row column">
<text class="order-label">备注说明</text>
<textarea class="order-textarea" value="{{remark}}" placeholder="请输入其他需求或备注信息" maxlength="200" placeholder-class="input-placeholder" bindinput="onRemarkChange" />
<text class="textarea-count">{{remark.length}}/200</text>
<view class="order-row column remark-row">
<text class="order-label">备注说明</text>
<textarea class="order-textarea" value="{{remark}}" placeholder="请输入其他需求或备注信息" maxlength="200" placeholder-class="input-placeholder" bindinput="onRemarkChange" />
<text class="textarea-count">{{remark.length}}/200</text>
</view>
</view>
<!-- 下单前置确认:勾选后才允许提交预约 -->
<view class="agreement-block {{agreementHint ? 'is-hint' : ''}}">
<view class="agreement-row" bindtap="onToggleAgreement" aria-role="checkbox" aria-checked="{{agreementAgreed}}">
<view class="agreement-check {{agreementAgreed ? 'checked' : ''}}">
<t-icon wx:if="{{agreementAgreed}}" name="check" size="22rpx" color="#FFFFFF" />
<view wx:if="{{agreementAgreed}}" class="selection-check"></view>
</view>
<view class="agreement-consent">
<text class="agreement-consent-text">我已阅读并同意</text>
@@ -226,10 +244,12 @@
</scroll-view>
<view class="popup-footer">
<view class="popup-price">
<text class="popup-price-label">合计</text>
<text class="price-sym">¥</text>
<text class="popup-price-value">{{ totalPrice }}</text>
<view class="popup-summary">
<text class="popup-price-label">服务费用</text>
<view class="popup-price">
<text class="price-sym">¥</text>
<text class="popup-price-value">{{ totalPrice }}</text>
</view>
</view>
<button class="popup-submit-btn" bindtap="submitOrder" disabled="{{submitting}}" loading="{{submitting}}">{{submitting ? '提交中' : '提交预约'}}</button>
</view>