style(order): 预约下单页兜底与项目切换入口强化

初始化拆出 loadPageContent,协议、医院列表与登录状态失败各自降级,不再挡整页;
陪诊项目「更换」改为品牌橙胶囊并改名「更换服务」,箭头同步换色;
就诊人胶囊补同名提示,导航栏统一为浅色纸面。
This commit is contained in:
lik
2026-11-16 19:30:44 +08:00
parent b6ff12021f
commit 3755e1283b
4 changed files with 232 additions and 117 deletions
+50 -31
View File
@@ -1,19 +1,17 @@
<!--pages/escort/itemorder.wxml-->
<view class="page-bg">
<view class="container" wx:if="{{service.id}}">
<!-- 页名已在导航栏(「立即预约」),页内不再重复一遍大标题;
只留页面级记号 + 一句导语,与 itemlist 页首同一套语言 -->
<view class="page-lead">
<view class="page-accent"></view>
<text class="page-lead-text">选择陪诊项目,填写信息后即可提交预约</text>
</view>
<view class="container" wx:if="{{!pageLoading && !pageError && service.id}}">
<!-- 四组信息按填写顺序组织;不改变预约、协议与支付逻辑。 -->
<view class="booking-form">
<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="service-picker-row">
<text class="order-label">陪诊项目</text>
<view class="service-picker {{submitting ? 'is-disabled' : ''}}">
<view class="order-service-info" bindtap="onToggleServicePanel">
<view class="order-service-info" bindtap="onToggleServicePanel" aria-role="button" aria-label="切换陪诊项目" aria-expanded="{{servicePanelOpen}}">
<view class="order-service-mark">
<view class="assist-icon {{serviceIconClass}}"></view>
</view>
@@ -21,8 +19,11 @@
<text class="order-service-title">{{service.title}}</text>
<text class="order-service-price">¥{{service.price}}/次</text>
</view>
<view class="service-picker-arrow {{servicePanelOpen ? 'is-open' : ''}}">
<t-icon name="chevron-down" size="40rpx" color="#9B4508" />
<view class="service-switch">
<text>更换服务</text>
<view class="service-picker-arrow {{servicePanelOpen ? 'is-open' : ''}}">
<t-icon name="chevron-down" size="28rpx" color="#9B4508" />
</view>
</view>
</view>
@@ -45,15 +46,25 @@
</view>
</view>
</view>
<text class="service-fee-note">费用仅含人工服务费,不含就医、药品及快递费用。</text>
</view>
<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>
<view class="order-row column patient-select-row">
<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>
data-id="{{item._id}}" bindtap="onSelectProfile" aria-role="radio" aria-checked="{{selectedProfileId === item._id}}">
<view wx:if="{{selectedProfileId === item._id}}" class="selection-check"></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" />
@@ -67,17 +78,17 @@
</view>
</view>
<!-- 就诊人姓名/电话只读,与所选档案严格一致 -->
<view class="order-row">
<text class="order-label">就诊人姓名</text>
<text class="order-value {{patientName ? '' : 'placeholder'}}">{{patientName || '请先选择就诊人'}}</text>
</view>
<view class="order-row">
<text class="order-label">联系电话</text>
<text class="order-value {{patientPhone ? '' : 'placeholder'}}">{{patientPhone || '请先选择就诊人'}}</text>
</view>
</view>
<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">
@@ -94,7 +105,6 @@
options="{{hospitalOptions}}"
placeholder="请选择就诊医院"
disabled="{{submitting}}"
scroll-anchor-offset="{{200}}"
bindchange="onHospitalChange"
/>
@@ -130,7 +140,14 @@
</view>
</picker>
</view>
</view>
<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>
@@ -138,17 +155,17 @@
<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" />
<view class="order-row column remark-row">
<textarea class="order-textarea" aria-label="补充信息(选填)" 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>
@@ -162,10 +179,12 @@
<view class="bottom-placeholder"></view>
<view class="bottom-bar">
<view class="bottom-price">
<text class="bottom-price-label">合计</text>
<text class="price-sym">¥</text>
<text class="bottom-price-value">{{totalPrice}}</text>
<view class="bottom-summary">
<text class="bottom-price-label">服务费用</text>
<view class="bottom-price">
<text class="price-sym">¥</text>
<text class="bottom-price-value">{{totalPrice}}</text>
</view>
</view>
<button class="submit-btn" bindtap="submitOrder" disabled="{{submitting}}" loading="{{submitting}}">{{submitting ? '提交中' : '提交预约'}}</button>
</view>