修改了页面样式。
This commit is contained in:
+11
-11
@@ -8,6 +8,7 @@ Page({
|
||||
pageError: '',
|
||||
totalPrice: '0.00',
|
||||
serviceIcon: 'user-business',
|
||||
activeTab: 'detail',
|
||||
showOrderPopup: false,
|
||||
submitting: false,
|
||||
profiles: [],
|
||||
@@ -32,9 +33,7 @@ Page({
|
||||
requiresAddress: false,
|
||||
gender: '不限',
|
||||
genderIndex: 0,
|
||||
genderOptions: ['不限', '男', '女'],
|
||||
department: '',
|
||||
departments: ['内科', '外科', '妇产科', '儿科', '骨科', '神经科', '心血管内科', '消化内科', '呼吸内科', '内分泌科', '皮肤科', '眼科', '耳鼻喉科', '口腔科', '急诊科', '肿瘤科', '康复医学科', '老年病科', '中医科', '针灸推拿科']
|
||||
genderOptions: ['不限', '男', '女']
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@@ -86,6 +85,14 @@ Page({
|
||||
this.initializePage()
|
||||
},
|
||||
|
||||
onTabChange(e) {
|
||||
const tab = e.currentTarget.dataset.tab
|
||||
if (!tab || tab === this.data.activeTab) return
|
||||
this.setData({ activeTab: tab })
|
||||
// 两个页签内容高度不同,切换后回到页首,避免停在上一页的滚动位置
|
||||
wx.pageScrollTo({ scrollTop: 0, duration: 0 })
|
||||
},
|
||||
|
||||
applyBookingConfig(service) {
|
||||
const booking = service.booking || {}
|
||||
const sessions = booking.sessions || []
|
||||
@@ -214,10 +221,6 @@ Page({
|
||||
this.setData({ hospital: e.detail.value })
|
||||
},
|
||||
|
||||
onDepartmentChange(e) {
|
||||
this.setData({ department: e.detail.value })
|
||||
},
|
||||
|
||||
onDateChange(e) {
|
||||
this.setData({ appointmentDate: e.detail.value })
|
||||
},
|
||||
@@ -249,7 +252,6 @@ Page({
|
||||
const data = this.data
|
||||
if (!data.selectedProfileId || !data.selectedPatient) return '请选择就诊人'
|
||||
if (!data.hospital.trim()) return '请输入就诊医院'
|
||||
if (!data.department.trim()) return '请输入就诊科室'
|
||||
if (!data.appointmentDate) return '请选择预约日期'
|
||||
if (!data.appointmentTime) return '请选择预约时间'
|
||||
if (data.requiresAddress && !data.shippingAddress.trim()) return '请填写完整收货地址'
|
||||
@@ -278,8 +280,7 @@ Page({
|
||||
},
|
||||
hospital: {
|
||||
province: data.province,
|
||||
name: data.hospital.trim(),
|
||||
department: data.department.trim()
|
||||
name: data.hospital.trim()
|
||||
},
|
||||
schedule: {
|
||||
date: data.appointmentDate,
|
||||
@@ -316,7 +317,6 @@ Page({
|
||||
province: provinces[0] || '',
|
||||
provinceIndex: 0,
|
||||
hospital: '',
|
||||
department: '',
|
||||
appointmentDate: '',
|
||||
appointmentTime: '',
|
||||
sessionIndex: 0,
|
||||
|
||||
@@ -12,46 +12,60 @@
|
||||
<text class="header-subtitle">{{ service.subtitle }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 服务详情 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">服务详情</text>
|
||||
</view>
|
||||
<text class="detail-text">{{ service.description }}</text>
|
||||
<!-- 内容分页:「服务详情 + 注意事项」都是读一遍的信息,放同一页;
|
||||
「服务流程」有先后顺序,单独一页,避免首屏被长流程占满 -->
|
||||
<view class="tab-bar">
|
||||
<view class="tab-item {{activeTab === 'detail' ? 'active' : ''}}" data-tab="detail" bindtap="onTabChange"
|
||||
aria-role="tab" aria-label="服务详情">服务详情</view>
|
||||
<view class="tab-item {{activeTab === 'flow' ? 'active' : ''}}" data-tab="flow" bindtap="onTabChange"
|
||||
aria-role="tab" aria-label="服务流程">服务流程</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务流程:这是真序列,编号在此处合法。橙色导轨是本页唯一的结构性重音,
|
||||
实心橙仍只留给底部与弹窗的提交按钮 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">服务流程</text>
|
||||
<!-- 详情页:服务说明 + 注意事项 -->
|
||||
<view class="tab-panel" wx:if="{{activeTab === 'detail'}}">
|
||||
<!-- 服务详情 -->
|
||||
<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>
|
||||
</view>
|
||||
<view class="step-list">
|
||||
<view class="step" wx:for="{{ service.flow }}" wx:key="title">
|
||||
<view class="step-rail">
|
||||
<view class="step-dot">{{ index + 1 }}</view>
|
||||
<view class="step-line" wx:if="{{ index < service.flow.length - 1 }}"></view>
|
||||
</view>
|
||||
<view class="step-body">
|
||||
<text class="step-title">{{ item.title }}</text>
|
||||
<text class="step-desc">{{ item.desc }}</text>
|
||||
|
||||
<!-- 注意事项:与指南页同一套圆点语言 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">注意事项</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ service.notices }}" wx:key="id">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 注意事项:与指南页同一套圆点语言 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">注意事项</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ service.notices }}" wx:key="id">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item.text }}</text>
|
||||
<!-- 流程页:这是真序列,编号在此处合法。橙色导轨是本页唯一的结构性重音,
|
||||
实心橙仍只留给底部与弹窗的提交按钮 -->
|
||||
<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">
|
||||
<view class="step" wx:for="{{ service.flow }}" wx:key="title">
|
||||
<view class="step-rail">
|
||||
<view class="step-dot">{{ index + 1 }}</view>
|
||||
<view class="step-line" wx:if="{{ index < service.flow.length - 1 }}"></view>
|
||||
</view>
|
||||
<view class="step-body">
|
||||
<text class="step-title">{{ item.title }}</text>
|
||||
<text class="step-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -142,12 +156,6 @@
|
||||
<input class="order-input" value="{{hospital}}" placeholder="请输入就诊医院" placeholder-class="input-placeholder" bindinput="onHospitalChange" />
|
||||
</view>
|
||||
|
||||
<!-- 就诊科室 -->
|
||||
<view class="order-row">
|
||||
<text class="order-label">就诊科室</text>
|
||||
<input class="order-input" value="{{department}}" placeholder="请输入就诊科室" placeholder-class="input-placeholder" bindinput="onDepartmentChange" />
|
||||
</view>
|
||||
|
||||
<!-- 陪诊师性别要求 -->
|
||||
<view class="order-row">
|
||||
<text class="order-label">陪诊师性别</text>
|
||||
|
||||
@@ -106,6 +106,32 @@ page {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ===== 内容页签:纯文字 + 底边,不用圆角胶囊、不加背景块与过渡 =====
|
||||
选中态只用 --brand-ink 文字 + 一条 --brand-strong 底边,比实心橙轻,不与提交按钮抢重音 */
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
margin-top: 32rpx;
|
||||
border-bottom: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
padding: 18rpx 0;
|
||||
/* 下沉 2rpx 压住轨道底边,未选中项留同宽透明底边,切换时高度不跳 */
|
||||
margin-bottom: -2rpx;
|
||||
border-bottom: 4rpx solid transparent;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: var(--brand-ink);
|
||||
font-weight: 700;
|
||||
border-bottom-color: var(--brand-strong);
|
||||
}
|
||||
|
||||
/* ===== 通用区块:靠发丝线切分,不靠白卡浮起来 ===== */
|
||||
.section {
|
||||
margin-top: 44rpx;
|
||||
@@ -113,6 +139,13 @@ page {
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
/* 页签内的首个区块:页签下边线已切分,不再叠一条分隔线 */
|
||||
.section.section-first {
|
||||
margin-top: 32rpx;
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -15,12 +15,20 @@ const SEX_REQUIREMENT_MAP = {
|
||||
female: '女'
|
||||
}
|
||||
|
||||
// 支付方式:与 schema 的 payment.method 枚举一一对应
|
||||
const PAYMENT_METHOD_MAP = {
|
||||
online_wechat: '线上微信',
|
||||
offline_cash: '线下现金',
|
||||
offline_transfer: '线下转账'
|
||||
}
|
||||
|
||||
const WEEKDAYS = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
||||
|
||||
Page({
|
||||
data: {
|
||||
recordId: '',
|
||||
record: {},
|
||||
showAllDetails: false,
|
||||
service: null,
|
||||
loading: false,
|
||||
loadError: '',
|
||||
@@ -144,7 +152,7 @@ Page({
|
||||
const profile = detail.profile || {}
|
||||
const health = detail.health || {}
|
||||
// 与 formatRecord 同一批就诊人字段:档案加载完成后覆盖订单快照,
|
||||
// 摘要行与首字牌因此需要一起重算
|
||||
// 展开区资料因此需要一起重算
|
||||
const patient = {
|
||||
name: profile.name || '',
|
||||
sexText: SEX_MAP[profile.sex] || '',
|
||||
@@ -156,13 +164,10 @@ Page({
|
||||
}
|
||||
this.setData({
|
||||
'record.patientName': patient.name,
|
||||
'record.patientAge': patient.age,
|
||||
'record.patientWeight': patient.weight,
|
||||
'record.patientHeight': patient.height,
|
||||
'record.patientMobile': patient.mobile,
|
||||
'record.patientIdnumber': maskIdNumber(patient.idnumber),
|
||||
'record.patientInitial': patient.name.charAt(0),
|
||||
'record.patientMeta': this.buildPatientMeta(patient)
|
||||
'record.patientMeta': this.buildPatientMeta(patient),
|
||||
'record.patientBrief': this.buildPatientBrief(patient)
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -182,13 +187,13 @@ Page({
|
||||
const canDelete = paymentStatus === 'unpaid'
|
||||
&& (status === 'pending' || status === 'confirmed' || status === 'cancelled')
|
||||
const canRebook = (status === 'completed' || status === 'cancelled') && item.escort?.serviceId > 0
|
||||
// 终态单据只读:医院预约与陪诊需求不允许回改(就诊人「修改」改的是档案,不在此列)
|
||||
// 终态单据只读:医院预约与陪诊需求不允许回改(就诊人「档案」跳的是档案页,不在此列)
|
||||
// 进行中服务已开始:排期与医院不允许用户单方变更,仅保留就诊人备注(与后端字段白名单一致)
|
||||
const canEditBooking = status === 'pending' || status === 'confirmed'
|
||||
const canEditNote = canEditBooking || status === 'in_progress'
|
||||
|
||||
// 就诊人字段先落到局部变量:摘要行(patientMeta)与首字牌(patientInitial)
|
||||
// 都从同一批值派生,口径不在 WXML 与 JS 两处各写一份
|
||||
// 就诊人字段先落到局部变量:摘要姓名与展开区资料都从同一批值派生,
|
||||
// 口径不在 WXML 与 JS 两处各写一份
|
||||
const patient = {
|
||||
name: item.patient?.name || '',
|
||||
sexText: SEX_MAP[item.patient?.sex] || '',
|
||||
@@ -199,7 +204,7 @@ Page({
|
||||
idnumber: item.patient?.idnumber || ''
|
||||
}
|
||||
|
||||
// 预约时间派生:日期行(带星期)、时间行(时段 + 陪诊时长)
|
||||
// 预约时间派生:日期行(带星期)与开始时间同一行
|
||||
const scheduleMeta = this.buildScheduleMeta(item.schedule || {})
|
||||
|
||||
return {
|
||||
@@ -208,16 +213,19 @@ Page({
|
||||
healthProfileId: item.healthProfileId || '',
|
||||
serviceId: item.escort?.serviceId || 0,
|
||||
patientName: patient.name,
|
||||
patientAge: patient.age,
|
||||
patientMobile: patient.mobile,
|
||||
patientIdnumber: maskIdNumber(patient.idnumber),
|
||||
patientInitial: patient.name.charAt(0),
|
||||
patientMeta: this.buildPatientMeta(patient),
|
||||
patientBrief: this.buildPatientBrief(patient),
|
||||
// 陪诊师由平台分配:以 id 或 name 任一存在视为已派单,
|
||||
// 派单若只写了 id 而没冗余姓名,卡片也不会误报「待分配」
|
||||
hasAttendant: Boolean(item.attendant?.id || item.attendant?.name),
|
||||
attendantName: item.attendant?.name || '',
|
||||
attendantMobile: item.attendant?.mobile || '',
|
||||
hospitalProvince: item.hospital?.province || '',
|
||||
hospitalName: item.hospital?.name || '',
|
||||
hospitalAddress: item.hospital?.address || '',
|
||||
hospitalMeta: this.buildHospitalMeta(item.hospital || {}),
|
||||
// 以下三个原始字段不进展示(展示走 hospitalMeta),是编辑弹窗的表单回填源
|
||||
// 科室用于摘要展示;医生、病历号与省份只做编辑弹窗的回填源,不再在展开区重复
|
||||
hospitalDepartment: item.hospital?.department || '',
|
||||
hospitalDoctor: item.hospital?.doctor || '',
|
||||
medicalRecordNo: item.hospital?.medicalRecordNo || '',
|
||||
@@ -239,7 +247,7 @@ Page({
|
||||
paymentStatusColor: paymentInfo.color,
|
||||
paymentStatusBg: paymentInfo.bg,
|
||||
paymentStatusBorder: paymentInfo.border,
|
||||
paymentHint: paymentInfo.hint || '',
|
||||
paymentMethodText: PAYMENT_METHOD_MAP[item.payment?.method] || '',
|
||||
patientNote: item.notes?.patientNote || '',
|
||||
escortNote: item.notes?.escortNote || '',
|
||||
medicalSummary: item.notes?.medicalSummary || '',
|
||||
@@ -261,30 +269,26 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
// 就诊人摘要行的字段序列:空值整项剔除,WXML 只负责在项之间插竖线,
|
||||
// 不靠一串 && 条件去猜哪条分隔线该出现(避免留下孤立的分隔线)
|
||||
// 展开区「就诊人资料」的字段序列:只留摘要卡没展示的核对项(身高体重),
|
||||
// 性别年龄已在摘要卡的就诊人行给出,此处不再重复;
|
||||
// 空值整项剔除,WXML 只负责在项之间插竖线
|
||||
buildPatientMeta(patient) {
|
||||
const list = []
|
||||
if (patient.sexText) list.push({ id: 'sex', text: patient.sexText })
|
||||
if (patient.age) list.push({ id: 'age', text: `${patient.age}岁` })
|
||||
if (patient.height) list.push({ id: 'height', text: `身高 ${patient.height}cm` })
|
||||
if (patient.weight) list.push({ id: 'weight', text: `体重 ${patient.weight}kg` })
|
||||
return list
|
||||
},
|
||||
|
||||
// 医院元信息行:科室 / 医生 / 病历号,与就诊人摘要同一套插线逻辑;
|
||||
// 省份不进元信息行,由 hospitalProvince 单独提到卡内右上角
|
||||
buildHospitalMeta(hospital) {
|
||||
// 摘要卡就诊人行只取性别与年龄:这两项决定陪诊师是否需要额外准备,
|
||||
// 身高体重属核对资料,留在展开区(buildPatientMeta 那份)
|
||||
buildPatientBrief(patient) {
|
||||
const list = []
|
||||
if (hospital.department) list.push({ id: 'department', text: hospital.department })
|
||||
if (hospital.doctor) list.push({ id: 'doctor', text: hospital.doctor })
|
||||
if (hospital.medicalRecordNo) {
|
||||
list.push({ id: 'medicalRecordNo', text: `病历号 ${hospital.medicalRecordNo}` })
|
||||
}
|
||||
if (patient.sexText) list.push({ id: 'sex', text: patient.sexText })
|
||||
if (patient.age) list.push({ id: 'age', text: `${patient.age}岁` })
|
||||
return list
|
||||
},
|
||||
|
||||
// 预约时间派生:日期行(带星期)、时间行(时段 + 陪诊时长);
|
||||
// 预约时间派生:日期行(带星期)与开始时间同一行;
|
||||
// 日期无效或缺失时返回空串,由 WXML 走兜底文案
|
||||
buildScheduleMeta(schedule) {
|
||||
const result = { dateText: '', timeText: '' }
|
||||
@@ -295,18 +299,7 @@ Page({
|
||||
}
|
||||
}
|
||||
const start = schedule.startTime || ''
|
||||
const end = schedule.endTime || ''
|
||||
let timeText = start && end ? `${start} - ${end}` : (start ? `${start} 开始` : '')
|
||||
const duration = schedule.duration || 0
|
||||
if (timeText && duration > 0) {
|
||||
const hours = Math.floor(duration / 60)
|
||||
const minutes = duration % 60
|
||||
const durationText = hours > 0
|
||||
? (minutes > 0 ? `${hours}小时${minutes}分钟` : `${hours}小时`)
|
||||
: `${minutes}分钟`
|
||||
timeText = `${timeText} · 陪诊${durationText}`
|
||||
}
|
||||
result.timeText = timeText
|
||||
result.timeText = start
|
||||
return result
|
||||
},
|
||||
|
||||
@@ -318,10 +311,8 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
onCallPatient() {
|
||||
const mobile = this.data.record.patientMobile
|
||||
if (!mobile || mobile === '--') return
|
||||
wx.makePhoneCall({ phoneNumber: mobile })
|
||||
onToggleDetails() {
|
||||
this.setData({ showAllDetails: !this.data.showAllDetails })
|
||||
},
|
||||
|
||||
// ===== 陪诊需求编辑(底部弹窗) =====
|
||||
@@ -471,8 +462,8 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 就诊人信息统一在健康档案里维护,这里只负责跳转
|
||||
onEditProfile() {
|
||||
// 就诊人信息统一在健康档案里维护,这里只负责跳转查看
|
||||
onViewProfile() {
|
||||
const profileId = this.data.record.healthProfileId
|
||||
if (!profileId) {
|
||||
return
|
||||
@@ -561,6 +552,13 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 回首页:首页是 tabBar 页,必须走 switchTab,navigateTo 跳不过去
|
||||
onGoHome() {
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
},
|
||||
|
||||
// 本页含就诊人姓名 / 手机号 / 身份证号与订单号,转发卡片不指向本页,统一落到首页;
|
||||
// 也不提供朋友圈分享——朋友圈只能分享当前页 URL,会把订单页地址带出去
|
||||
onShareAppMessage() {
|
||||
|
||||
+188
-156
@@ -1,10 +1,11 @@
|
||||
<view class="page-bg">
|
||||
<!-- 数据到位前不渲染内容:record 初始是 {},直接铺开会先闪一帧
|
||||
「就诊医院待补充 / ¥0.00 / 暂无备注信息」的假数据,用 _id 作到位判据 -->
|
||||
「就诊医院待补充 / ¥0.00」的假数据,用 _id 作到位判据 -->
|
||||
<view class="container" wx:if="{{record._id}}">
|
||||
|
||||
<!-- 状态头:短横色标 + 状态胶囊 + 状态说明,是本页的「单据抬头」,不走卡片。
|
||||
状态色只包住胶囊文字本身(DESIGN.md §三),不做整块主色面板 -->
|
||||
状态色只包住胶囊文字本身(DESIGN.md §三),不做整块主色面板;
|
||||
客服入口收到抬头右侧:支付、改期、退款等问题不必等某个提示行出现才找得到 -->
|
||||
<view class="page-header">
|
||||
<view class="header-accent"></view>
|
||||
<view class="status-row">
|
||||
@@ -12,108 +13,190 @@
|
||||
class="status-chip status-chip-lg"
|
||||
style="background: {{record.statusBg}}; color: {{record.statusColor}}; border-color: {{record.statusBorder}};"
|
||||
>{{record.statusText}}</view>
|
||||
<text class="header-subtitle">{{record.statusDesc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 全页信息架构:抬头之下五张同构白卡(就诊人 / 医院预约 / 需求与症状 / 服务与费用 / 订单),
|
||||
标题在纸面上、内容在白卡里——同一层级只用一种载体。
|
||||
页面本身纯展示(不铺「标签左/值右」的表单行),所有修改都收进底部弹窗:
|
||||
卡片回答「是什么」,弹窗回答「改成什么」,两种语境不混在同一版面里 -->
|
||||
|
||||
<!-- 就诊人信息:订单关联健康档案,就诊人信息以档案为准,
|
||||
因此「修改」直接去档案页,不在订单侧另开一套编辑(同一意图只保留一个入口) -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">就诊人信息</text>
|
||||
<view class="section-link" wx:if="{{record.healthProfileId}}" bindtap="onEditProfile">
|
||||
<text class="section-link-text">修改</text>
|
||||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 身份牌:首字牌定位「是谁」,姓名、体征元信息、证件号收进首字牌右侧纵列;
|
||||
发丝线之下只留一个动作(拨打) -->
|
||||
<view class="card patient-card">
|
||||
<view class="patient-head">
|
||||
<!-- 首字牌沿用「浅橙衬底承载标识」:有姓名取姓氏首字,无则退到 user 图标 -->
|
||||
<view class="patient-mark">
|
||||
<text wx:if="{{record.patientInitial}}" class="patient-mark-text">{{record.patientInitial}}</text>
|
||||
<t-icon wx:else name="user" size="44rpx" color="#9B4508" />
|
||||
</view>
|
||||
<view class="patient-info">
|
||||
<text class="patient-name">{{record.patientName || '--'}}</text>
|
||||
|
||||
<!-- 体征行:空值已在 JS 里整项剔除,这里只按序插竖线 -->
|
||||
<view class="meta-list patient-meta-row" wx:if="{{record.patientMeta.length > 0}}">
|
||||
<block wx:for="{{record.patientMeta}}" wx:key="id">
|
||||
<view class="meta-sep" wx:if="{{index > 0}}"></view>
|
||||
<text class="meta-item">{{item.text}}</text>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<text class="patient-id" wx:if="{{record.patientIdnumber}}">身份证号 {{record.patientIdnumber}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 发丝线之上是「是谁」,之下是唯一动作:整行可点拨打 -->
|
||||
<view class="patient-contact" bindtap="onCallPatient">
|
||||
<t-icon name="call" size="30rpx" color="#9B4508" />
|
||||
<text class="patient-contact-text">{{record.patientMobile || '--'}}</text>
|
||||
<text class="header-subtitle" wx:if="{{record.status !== 'completed' && record.status !== 'cancelled'}}">{{record.statusDesc}}</text>
|
||||
<view
|
||||
class="header-support"
|
||||
aria-role="button"
|
||||
aria-label="联系客服"
|
||||
bindtap="onContactSupport"
|
||||
>
|
||||
<t-icon name="help-circle" size="32rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 医院预约信息:医院名为标题,省份提到标题行右上角,科室/医生/病历号收进元信息行;
|
||||
预约时间收在卡末发丝线之下——日期左、时段与时长右,一行排开。修改走底部弹窗 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">医院预约信息</text>
|
||||
<view class="section-link" wx:if="{{record.canEditBooking}}" bindtap="onEditHospital">
|
||||
<text class="section-link-text">修改</text>
|
||||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 本页面向就诊人或家属,默认只回答「何时、给谁、去哪、什么服务、多少钱」。
|
||||
档案、支付明细和订单技术信息收进展开区;所有修改仍沿用分区入口 -->
|
||||
|
||||
<view class="card hospital-card">
|
||||
<!-- 省份提到右上角,与医院名同一行:名称是主信息,省份降为右侧小字标签 -->
|
||||
<view class="hospital-head">
|
||||
<text class="hospital-name {{!record.hospitalName ? 'is-empty' : ''}}">{{record.hospitalName || '就诊医院待补充'}}</text>
|
||||
<text class="hospital-province" wx:if="{{record.hospitalProvince}}">{{record.hospitalProvince}}</text>
|
||||
</view>
|
||||
<!-- 就诊基本信息卡:这页是就诊人自己看「哪天几点去哪、谁陪我」,
|
||||
不是商家认顾客的订单卡——不铺自己的头像与手机号,
|
||||
时间提到首落点,陪诊师单独一行(平台分配后才是本人最需要认的人) -->
|
||||
<view class="card appointment-card">
|
||||
|
||||
<view class="meta-list hospital-meta" wx:if="{{record.hospitalMeta.length > 0}}">
|
||||
<block wx:for="{{record.hospitalMeta}}" wx:key="id">
|
||||
<view class="meta-sep" wx:if="{{index > 0}}"></view>
|
||||
<text class="meta-item">{{item.text}}</text>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<text class="hospital-address" wx:if="{{record.hospitalAddress}}">{{record.hospitalAddress}}</text>
|
||||
|
||||
<!-- 预约时间条:日期(带星期)在左、时段与陪诊时长在右,一行排开;空值有兜底文案 -->
|
||||
<view class="schedule-row">
|
||||
<!-- 时间:卡内首落点。日期给全卡最大字号,时段用暖橙同处一行。
|
||||
完整信息的入口不再是一行文字开关:卡片右上角一枚向下箭头,
|
||||
点开后就在原位铺开展开区 -->
|
||||
<view class="schedule-row">
|
||||
<view class="schedule-block">
|
||||
<text class="schedule-date {{!record.scheduleDateText ? 'is-empty' : ''}}">{{record.scheduleDateText || '预约日期待定'}}</text>
|
||||
<text class="schedule-time" wx:if="{{record.scheduleTimeText}}">{{record.scheduleTimeText}}</text>
|
||||
</view>
|
||||
<view
|
||||
class="details-expand"
|
||||
aria-role="button"
|
||||
aria-label="{{showAllDetails ? '收起完整订单信息' : '展开完整订单信息'}}"
|
||||
aria-expanded="{{showAllDetails}}"
|
||||
bindtap="onToggleDetails"
|
||||
>
|
||||
<view class="details-expand-icon {{showAllDetails ? 'is-expanded' : ''}}">
|
||||
<t-icon name="chevron-down" size="32rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 医院 / 服务 / 就诊人:两字小标签逐行作答 -->
|
||||
<view class="appt-rows">
|
||||
<view class="appt-row">
|
||||
<text class="appt-label">医院</text>
|
||||
<view class="appt-value">
|
||||
<text class="appt-text {{!record.hospitalName ? 'is-empty' : ''}}">{{record.hospitalName || '就诊医院待补充'}}</text>
|
||||
<text class="appt-text" wx:if="{{record.hospitalDepartment}}"> · {{record.hospitalDepartment}}</text>
|
||||
<text class="appt-sub" wx:if="{{record.hospitalAddress}}">{{record.hospitalAddress}}</text>
|
||||
</view>
|
||||
<view
|
||||
class="row-entry"
|
||||
wx:if="{{record.canEditBooking}}"
|
||||
aria-role="button"
|
||||
aria-label="修改医院预约信息"
|
||||
bindtap="onEditHospital"
|
||||
>
|
||||
<t-icon name="edit" size="28rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="appt-row">
|
||||
<text class="appt-label">服务</text>
|
||||
<view class="appt-value">
|
||||
<text class="appt-text">{{record.escortServiceName || '陪诊服务'}}</text>
|
||||
<text class="appt-text" wx:if="{{record.sexRequirementText}}"> · 性别要求{{record.sexRequirementText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 陪诊师不在此行重复,下方独立卡片承载姓名与电话。
|
||||
就诊人降为一行:核对「是不是我」即可,入口跳健康档案页 -->
|
||||
<view class="appt-row">
|
||||
<text class="appt-label">就诊人</text>
|
||||
<view class="appt-value">
|
||||
<text class="appt-text">{{record.patientName || '--'}}</text>
|
||||
<text class="appt-text" wx:if="{{record.patientBrief.length > 0}}"> · {{record.patientBrief[0].text}}</text>
|
||||
<text class="appt-text" wx:if="{{record.patientBrief.length > 1}}"> · {{record.patientBrief[1].text}}</text>
|
||||
</view>
|
||||
<view
|
||||
class="row-entry"
|
||||
wx:if="{{record.healthProfileId}}"
|
||||
aria-role="button"
|
||||
aria-label="查看就诊人档案"
|
||||
bindtap="onViewProfile"
|
||||
>
|
||||
<t-icon name="chevron-right" size="28rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 费用:标签与金额同行对齐;支付状态胶囊收在行尾 -->
|
||||
<view class="fee-line">
|
||||
<text class="appt-label">费用</text>
|
||||
<text class="fee-amount">¥{{record.totalFee}}</text>
|
||||
<view class="fee-side">
|
||||
<view
|
||||
class="status-chip"
|
||||
wx:if="{{record.paymentStatus !== 'paid'}}"
|
||||
style="background: {{record.paymentStatusBg}}; color: {{record.paymentStatusColor}}; border-color: {{record.paymentStatusBorder}};"
|
||||
>{{record.paymentStatusText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付与退款的引导统一由抬头的客服入口承担,
|
||||
不再在卡内挂一行「请联系客服…」:那句话只对未支付状态成立,
|
||||
却长期占着卡内一条常驻行位 -->
|
||||
|
||||
<view class="cancel-summary" wx:if="{{record.status === 'cancelled' && record.cancelReason}}">
|
||||
<text class="cancel-summary-label">取消原因</text>
|
||||
<text class="cancel-summary-value">{{record.cancelReason}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 完整信息按需展开,已完成、已取消等只读订单也始终可以核对 -->
|
||||
<view class="full-details" wx:if="{{showAllDetails}}">
|
||||
<!-- 手机号已不在摘要卡里(本人知道自己号码),此处也只留核对用的身高体重与证件号 -->
|
||||
<view class="detail-group" wx:if="{{record.patientMeta.length > 0 || record.patientIdnumber}}">
|
||||
<text class="detail-group-title">就诊人资料</text>
|
||||
<view class="meta-list detail-patient-meta" wx:if="{{record.patientMeta.length > 0}}">
|
||||
<block wx:for="{{record.patientMeta}}" wx:key="id">
|
||||
<view class="meta-sep" wx:if="{{index > 0}}"></view>
|
||||
<text class="meta-item">{{item.text}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view class="detail-row" wx:if="{{record.patientIdnumber}}">
|
||||
<text class="detail-label">身份证号</text>
|
||||
<text class="detail-value">{{record.patientIdnumber}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收货信息为下单时的订单快照,不随后续就诊人资料变化 -->
|
||||
<view class="detail-group" wx:if="{{record.shippingAddress && record.shippingAddress.address}}">
|
||||
<text class="detail-group-title">收货信息</text>
|
||||
<text class="shipping-recipient">{{record.shippingAddress.recipientName}} {{record.shippingAddress.mobile}}</text>
|
||||
<text class="shipping-address">{{record.shippingAddress.address}}</text>
|
||||
</view>
|
||||
|
||||
<view class="detail-group">
|
||||
<text class="detail-group-title">订单信息</text>
|
||||
<view class="detail-row">
|
||||
<text class="detail-label">订单编号</text>
|
||||
<text class="detail-value order-no">{{record.displayId}}</text>
|
||||
</view>
|
||||
<view class="detail-row">
|
||||
<text class="detail-label">创建时间</text>
|
||||
<text class="detail-value">{{record.createTime || '--'}}</text>
|
||||
</view>
|
||||
<view class="detail-row">
|
||||
<text class="detail-label">更新时间</text>
|
||||
<text class="detail-value">{{record.updateTime || '--'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 陪诊需求与症状:纯文本块展示,修改走底部弹窗(textarea 在弹窗里) -->
|
||||
<view class="section">
|
||||
<!-- 陪诊师卡片:已派单显示名与电话;派单正常时后台会写姓名,
|
||||
若只有 id 未冗余名则退成「已安排」,不误报「待分配」。
|
||||
未派单(如待确认)显示占位,让用户知道「会有一位陪诊师」;
|
||||
已取消、已完成且无人可联系时不出现——那是正常结果,不必提示 -->
|
||||
<view class="section attendant-section" wx:if="{{record.hasAttendant || (record.status !== 'cancelled' && record.status !== 'completed')}}">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">陪诊需求与症状</text>
|
||||
<view class="section-link" wx:if="{{record.canEditNote}}" bindtap="onEditPatientNote">
|
||||
<text class="section-title">陪诊师</text>
|
||||
</view>
|
||||
|
||||
<view class="card attendant-card">
|
||||
<text class="attendant-name" wx:if="{{record.hasAttendant}}">{{record.attendantName || '已安排'}}</text>
|
||||
<text class="attendant-empty" wx:else>待分配</text>
|
||||
<text class="attendant-phone" wx:if="{{record.attendantMobile}}">{{record.attendantMobile}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 有内容才铺正文;可编辑但内容为空时只留一个添加入口,不让空卡占位。
|
||||
已完成订单的陪诊记录和就诊摘要直接展示,不收入展开区 -->
|
||||
<view class="section note-section" wx:if="{{record.patientNote || record.escortNote || record.medicalSummary || record.canEditNote}}">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">{{record.status === 'completed' && (record.escortNote || record.medicalSummary) ? '服务结果' : (record.escortNote || record.medicalSummary ? '陪诊需求与记录' : '陪诊需求')}}</text>
|
||||
<view class="section-link" wx:if="{{record.canEditNote && (record.patientNote || record.escortNote || record.medicalSummary)}}" bindtap="onEditPatientNote">
|
||||
<text class="section-link-text">修改</text>
|
||||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card note-card">
|
||||
<view class="note-block" wx:if="{{record.patientNote}}">
|
||||
<text class="note-label" wx:if="{{record.escortNote || record.medicalSummary}}">陪诊需求</text>
|
||||
<text class="note-text">{{record.patientNote}}</text>
|
||||
</view>
|
||||
<view class="note-block" wx:if="{{record.escortNote}}">
|
||||
@@ -124,79 +207,17 @@
|
||||
<text class="note-label">就诊摘要</text>
|
||||
<text class="note-text">{{record.medicalSummary}}</text>
|
||||
</view>
|
||||
<view class="note-empty" wx:if="{{!record.patientNote && !record.escortNote && !record.medicalSummary}}">
|
||||
<text class="note-empty-text">暂无备注信息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务与费用:服务名称为主、支付状态胶囊收尾同行(仅待处理时显示,已付清不出现);
|
||||
费用行用字号差做层级(金额是全卡唯一的大字号焦点),不铺清单行;
|
||||
未付清时在费用行下补一句客服指引(全站没有线上支付入口,本页给不出可点的动作)。
|
||||
位置收在末尾:前面各块回答「服务什么」(人 → 去哪 → 要什么),
|
||||
费用与订单号同属「账与单」,连排在最后 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">服务与费用</text>
|
||||
</view>
|
||||
<view class="card service-card">
|
||||
<view class="service-head">
|
||||
<text class="service-name">{{record.escortServiceName || '陪诊服务'}}</text>
|
||||
<!-- 支付完成(paid)是常态不显示胶囊;只有待处理(未支付/部分支付/已退款)才提示 -->
|
||||
<view
|
||||
class="status-chip"
|
||||
wx:if="{{record.paymentStatus !== 'paid'}}"
|
||||
style="background: {{record.paymentStatusBg}}; color: {{record.paymentStatusColor}}; border-color: {{record.paymentStatusBorder}};"
|
||||
>{{record.paymentStatusText}}</view>
|
||||
</view>
|
||||
<view class="meta-list service-meta" wx:if="{{record.sexRequirementText}}">
|
||||
<text class="meta-item">陪诊师性别要求 {{record.sexRequirementText}}</text>
|
||||
</view>
|
||||
<view class="fee-row">
|
||||
<view class="fee-main">
|
||||
<text class="fee-label">服务费用</text>
|
||||
<text class="fee-amount">¥{{record.totalFee}}</text>
|
||||
</view>
|
||||
<text class="fee-paid" wx:if="{{record.showPaidFee}}">已支付 ¥{{record.paidFee}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 支付与退款问题都进入带订单上下文的客服页 -->
|
||||
<view class="pay-hint" wx:if="{{record.paymentHint}}" bindtap="onContactSupport">
|
||||
<text class="pay-hint-text">{{record.paymentHint}}</text>
|
||||
<t-icon name="chevron-right" size="26rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收货信息为下单时的订单快照,不随后续就诊人资料变化 -->
|
||||
<view class="section" wx:if="{{record.shippingAddress && record.shippingAddress.address}}">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">收货信息</text>
|
||||
</view>
|
||||
<view class="card">
|
||||
<text class="shipping-recipient">{{record.shippingAddress.recipientName}} {{record.shippingAddress.mobile}}</text>
|
||||
<text class="shipping-address">{{record.shippingAddress.address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息:编号脱敏展示,完整编号由客服入口安全携带 -->
|
||||
<view class="section">
|
||||
<view class="section-head">
|
||||
<view class="section-bar"></view>
|
||||
<text class="section-title">订单信息</text>
|
||||
</view>
|
||||
<view class="card order-card">
|
||||
<text class="order-no">订单编号 {{record.displayId}}</text>
|
||||
<view class="meta-list order-meta">
|
||||
<text class="meta-item">创建于 {{record.createTime || '--'}}</text>
|
||||
<view class="meta-sep"></view>
|
||||
<text class="meta-item">更新于 {{record.updateTime || '--'}}</text>
|
||||
</view>
|
||||
<view class="order-extra" wx:if="{{record.cancelReason}}">
|
||||
<text class="order-extra-label">取消原因</text>
|
||||
<text class="order-extra-value">{{record.cancelReason}}</text>
|
||||
<!-- 可编辑且三段全空:给一个轻量添加入口,避免用户失去补充需求的路径 -->
|
||||
<view
|
||||
class="note-add"
|
||||
wx:if="{{record.canEditNote && !record.patientNote && !record.escortNote && !record.medicalSummary}}"
|
||||
aria-role="button"
|
||||
aria-label="添加陪诊需求"
|
||||
bindtap="onEditPatientNote"
|
||||
>
|
||||
<t-icon name="add" size="28rpx" color="#9B4508" />
|
||||
<text class="note-add-text">添加陪诊需求</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -215,6 +236,17 @@
|
||||
|
||||
<!-- 底部操作栏:完成状态仅由平台流转,用户不确认完成 -->
|
||||
<view class="bottom-bar" wx:if="{{record.showBottomBar}}">
|
||||
<!-- 首页入口:底栏最左的固定位图标按钮,点了直接回首页。
|
||||
独立于订单动作,固定宽度、不参与右侧按钮的等宽分配;
|
||||
首页是 tabBar 页,必须走 switchTab,navigateTo 跳不过去 -->
|
||||
<view
|
||||
class="home-btn"
|
||||
aria-role="button"
|
||||
aria-label="返回首页"
|
||||
bindtap="onGoHome"
|
||||
>
|
||||
<view class="home-icon"></view>
|
||||
</view>
|
||||
<view
|
||||
class="action-btn action-ghost"
|
||||
wx:if="{{record.canCancel}}"
|
||||
|
||||
+338
-221
@@ -1,17 +1,17 @@
|
||||
/* pages/escort/recorddetail.wxss
|
||||
设计方向:本页是一张陪诊订单的详情,按「状态抬头 → 就诊人 → 医院预约 → 需求与症状 → 服务与费用 → 订单」铺开。
|
||||
- 配色并入全站暖橙体系(doc/DESIGN.md):令牌来自 app.wxss,本页不留副本;
|
||||
状态色只用 §三 四档,旧版渐变横幅与金色体系全部移除
|
||||
- 抬头:短横色标 + 状态胶囊 + 状态说明,是唯一的非卡片区(内页规范,不做整块主色面板);
|
||||
下方用 2rpx --line 通栏发丝线收口,靠字号两档差(32 胶囊 / 26 说明)与留白立住,不套第二套容器
|
||||
- 分区:标题在纸面上(8×32rpx 单竖条),内容统一收进同一种白卡
|
||||
(§2.3:2rpx --line + 中性阴影 --shadow-card;圆角本页取 24rpx 为例外,见下方 .card 注释)
|
||||
- 展示去表单化:不铺「标签左/值右」清单行,层级由结构给出——
|
||||
就诊人用首字牌、医院预约用预约时间条、费用用字号差;元信息一律竖线分隔行
|
||||
- 编辑全部收进底部弹窗:页面只读,表单只活在弹窗里
|
||||
- 按钮:底栏与弹窗的主操作实心胶囊、其余空心胶囊,同类实心块全页只保留一处(§2.1)
|
||||
- 字号阶梯:40 首字牌 / 32 分节标题 · 卡片主名 · 金额 · 状态胶囊 / 28 服务名 · 备注正文 · 预约日期
|
||||
/ 26 次强 · 「修改」入口 · 预约时段 · 订单号 / 24 元信息 · 已支付 · 支付指引,最小 24rpx(12px) */
|
||||
设计方向:面向就诊人或家属的预约凭证,而非订单字段清单。
|
||||
- 首屏用一张信息卡按「何时 → 给谁 → 去哪 → 什么服务 → 多少钱」的顺序作答,
|
||||
时间是唯一会过期的强约束信息,放在卡内首落点,避免多张同权重卡片争抢注意力;
|
||||
- 摘要卡先回答本人的问题:时间作首落点(日期最大字 + 暖橙色时段),
|
||||
再列「医院 / 服务 / 就诊人」,最后一行费用;
|
||||
不铺自己的头像与手机号——那是商家认顾客的版式,对本人零信息量;
|
||||
- 陪诊师单独成卡(名 + 电话),平台分配后才出现,不与摘要行重复;
|
||||
- 档案、支付明细、收货和订单技术信息按需展开,只读的历史订单也能核对完整资料;
|
||||
- 陪诊需求、陪诊记录与就诊摘要仅在有内容时出现,已完成订单的服务结果直接展示;
|
||||
- 修改仍按就诊人、医院预约、陪诊需求分区,表单只存在于档案页或底部弹窗;
|
||||
- 配色沿用 app.wxss 暖橙令牌,状态文字与颜色共同传达信息;
|
||||
- 字号阶梯:36 日期 / 34 金额 / 32 姓名 · 陪诊师名 / 28 行值(医院 · 服务 · 时段 · 电话)
|
||||
/ 24 标签 · 地址 · 辅助说明,最小 24rpx(12px) */
|
||||
page {
|
||||
background-color: var(--paper);
|
||||
|
||||
@@ -84,6 +84,24 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 抬头右侧客服入口:安静图标,靠位置与热区成立,不抢状态胶囊的焦点。
|
||||
负 margin 把热区撑到 88rpx 而不再抬高抬头区 */
|
||||
.header-support {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-width: 88rpx;
|
||||
min-height: 88rpx;
|
||||
margin: -20rpx -8rpx -20rpx auto;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.header-support:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* 状态胶囊:底色 + 描边 + 字色三件套,颜色只做强化,文字才是信息(§三) */
|
||||
.status-chip {
|
||||
display: inline-flex;
|
||||
@@ -107,6 +125,10 @@ page {
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
/* 说明文字吃掉剩余宽度,客服入口才被推到最右;
|
||||
min-width 0 让长说明正常收缩换行,不撑破抬头行 */
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
/* 28rpx 降到 26rpx:说明退到「次强」档,与 32rpx 的胶囊拉开一档差,
|
||||
抬头内部才有焦点;此前两者同为 28rpx,只靠字重区分,谁都不是主角 */
|
||||
@@ -207,296 +229,346 @@ page {
|
||||
background: var(--sep);
|
||||
}
|
||||
|
||||
/* ===== 就诊人卡:首字牌 + 元信息行 + 发丝线下的拨打动作 ===== */
|
||||
.patient-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* ===== 预约摘要卡:就诊人本人的行程卡 =====
|
||||
这页是本人看「哪天几点去哪、谁陪我」,不是商家认顾客的订单卡,
|
||||
所以不铺自己的头像与手机号:时间作首落点,
|
||||
「医院 / 服务 / 陪诊师 / 就诊人」四行小标签作答,底部一行费用 */
|
||||
.appointment-card {
|
||||
margin-top: 32rpx;
|
||||
padding: 28rpx;
|
||||
}
|
||||
|
||||
/* 首字牌:浅橙衬底 + --brand-line 描边,与陪诊师列表的兜底头像同源 */
|
||||
.patient-mark {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border: 2rpx solid var(--brand-line);
|
||||
border-radius: 24rpx;
|
||||
background: var(--brand-soft);
|
||||
}
|
||||
|
||||
.patient-mark-text {
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* 首字牌右侧纵列:姓名 / 体征元信息 / 证件号自上而下 */
|
||||
.patient-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
/* 姓名 32rpx/700:低于区块标题 34rpx 一档,不与标题争层级 */
|
||||
.patient-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.patient-meta-row {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
/* 身份证 18 位,折行而不是撑破卡片 */
|
||||
.patient-id {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 发丝线之上是「是谁」,之下是「怎么联系」;整行即热区 */
|
||||
.patient-contact {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 22rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.patient-contact-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.patient-contact:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* ===== 医院预约卡:日历牌是全卡视觉锚点 ===== */
|
||||
.hospital-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.hospital-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.hospital-name.is-empty {
|
||||
font-weight: 400;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.hospital-province {
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hospital-meta {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.hospital-address {
|
||||
display: block;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 预约时间条:发丝线之上是「去哪看」,之下是「什么时候看」——日期左、时段右 */
|
||||
/* 时间块:卡内首落点。日期给全卡最大字号——它是唯一会过期的
|
||||
强约束信息;时段用暖橙跟在同一行,是当天要准点到的第二关键信息 */
|
||||
.schedule-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.schedule-block {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
margin-top: 22rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
gap: 16rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.schedule-date {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 28rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.schedule-date.is-empty {
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.schedule-time {
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-ink);
|
||||
letter-spacing: 1rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ===== 服务与费用卡:金额是全卡唯一的大字号焦点 ===== */
|
||||
.service-head {
|
||||
/* 完整信息入口:卡片右上角的向下箭头,展开后翻转成向上。
|
||||
负 margin 把热区撑到 88rpx,只占 40rpx 高度,
|
||||
不把时间行顶高,也不与日期争字号 */
|
||||
.details-expand {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
min-width: 88rpx;
|
||||
min-height: 88rpx;
|
||||
margin: -24rpx -8rpx -16rpx 16rpx;
|
||||
}
|
||||
|
||||
.service-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
.details-expand:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.service-meta {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.fee-row {
|
||||
.details-expand-icon {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
margin-top: 18rpx;
|
||||
padding-top: 18rpx;
|
||||
align-items: center;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.details-expand-icon.is-expanded {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* 行右入口:只留图标,靠位置与热区成立,不靠颜色。
|
||||
负 margin 把热区撑到 88rpx 而不撑高行 */
|
||||
.row-entry {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-width: 64rpx;
|
||||
min-height: 88rpx;
|
||||
margin: -24rpx -8rpx -24rpx 16rpx;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.row-entry:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* 中段四行:两字小标签 + 值;标签列等宽,值的起点始终在同一竖线上 */
|
||||
.appt-rows {
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.fee-main {
|
||||
.appt-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
|
||||
.fee-label {
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.fee-amount {
|
||||
margin-left: 16rpx;
|
||||
/* 34rpx 降一档到 32rpx,与分区标题同一档,不新增字号档位;
|
||||
仍明显高于标签(26rpx)与「已支付」(24rpx),保住金额在卡内的大字号焦点地位 */
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-strong);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.fee-paid {
|
||||
/* 标签列按最长三字标签(陪诊师 / 就诊人)留宽,值的起点不错位 */
|
||||
.appt-label {
|
||||
flex-shrink: 0;
|
||||
width: 96rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* 支付/退款指引是可点击的客服入口,用 chevron 给出显性动作暗示 */
|
||||
.pay-hint {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 12rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.pay-hint:active {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.pay-hint-text {
|
||||
.appt-value {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 4rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.appt-text {
|
||||
font-size: 28rpx;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.appt-text.is-empty {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* 地址:医院行下的灰色副行,换行独占 */
|
||||
.appt-sub {
|
||||
flex-basis: 100%;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 费用行:标签列与上行对齐,金额主色,支付状态胶囊收行尾 */
|
||||
.fee-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.fee-amount {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: var(--brand-strong);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.fee-side {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 取消原因:--paper 底在白卡上只差 1.06:1,靠描边托形 */
|
||||
.cancel-summary {
|
||||
margin-top: 16rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
border: 2rpx solid var(--line);
|
||||
border-radius: 16rpx;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.cancel-summary-label {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.cancel-summary-value {
|
||||
display: block;
|
||||
margin-top: 6rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--ink-2);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ===== 完整信息:默认折叠,展开后按资料类型分组 ===== */
|
||||
.full-details {
|
||||
/* 展开区自带顶边:费用行不画底边,取消原因也自带边,
|
||||
任一块出现都只落一条分隔线 */
|
||||
margin-top: 16rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
/* 首个分组不再重复画顶边:它紧接 full-details 的顶边,
|
||||
两者只差 8rpx,会读成一条粗线或双线 */
|
||||
.full-details > .detail-group:first-child {
|
||||
margin-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.detail-group {
|
||||
margin-top: 8rpx;
|
||||
padding: 24rpx 0 8rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
/* 分隔线由上方 .full-details 的顶边提供,首组不再画第二条,避免双线并行 */
|
||||
.full-details .detail-group:first-child {
|
||||
padding-top: 12rpx;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.detail-group-title {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.detail-patient-meta {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.detail-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
flex-shrink: 0;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--ink-2);
|
||||
line-height: 1.5;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.shipping-recipient {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.shipping-address {
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--ink-2);
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ===== 订单卡:编号为主,时间收进元信息行 ===== */
|
||||
/* 订单号是需要逐字核对的标识符:左对齐、允许断行,不跟随右侧值的右对齐 */
|
||||
.order-no {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: var(--ink-2);
|
||||
text-align: left;
|
||||
letter-spacing: 1rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.order-meta {
|
||||
margin-top: 10rpx;
|
||||
/* ===== 陪诊师卡片:平台分配后才出现 =====
|
||||
就诊当天要联系的人单独成卡,只用「名 + 电话」两段,
|
||||
名字 32rpx 立住身份,电话弱一档在右侧,扫一眼就能报出是谁 */
|
||||
.attendant-section {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.order-extra {
|
||||
.attendant-card {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-top: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.order-extra-label {
|
||||
.attendant-name {
|
||||
flex-shrink: 0;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.order-extra-value {
|
||||
/* 电话靠右对齐:等宽数字不跳字,长号码也只会压缩自己不会挤名字 */
|
||||
.attendant-phone {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
color: var(--ink-2);
|
||||
letter-spacing: 1rpx;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* 待分配占位:与姓名同档字号但退到灰字,读作「还没定」而不是「没有」 */
|
||||
.attendant-empty {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 28rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ===== 备注(只读文本块) ===== */
|
||||
/* ===== 需求与服务结果:有内容才出现 ===== */
|
||||
.note-section {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.note-card {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.note-block {
|
||||
margin-top: 18rpx;
|
||||
margin-top: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid var(--line);
|
||||
}
|
||||
|
||||
.note-block:first-child {
|
||||
margin-top: 4rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.note-label {
|
||||
display: block;
|
||||
margin-bottom: 6rpx;
|
||||
margin-bottom: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
@@ -507,15 +579,26 @@ page {
|
||||
color: var(--ink-2);
|
||||
line-height: 1.7;
|
||||
letter-spacing: 1rpx;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.note-empty {
|
||||
padding: 6rpx 0;
|
||||
/* 空态添加入口:整行可点,热区不依赖小图标 */
|
||||
.note-add {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 88rpx;
|
||||
}
|
||||
|
||||
.note-empty-text {
|
||||
font-size: 28rpx;
|
||||
color: var(--muted);
|
||||
.note-add:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.note-add-text {
|
||||
margin-left: 8rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* ===== 表单行:只活在编辑弹窗里 =====
|
||||
@@ -598,6 +681,40 @@ page {
|
||||
box-shadow: var(--shadow-bar);
|
||||
}
|
||||
|
||||
/* 首页图标按钮:底栏最左的固定位圆形按钮。
|
||||
与右侧幽灵按钮同一套语言(--sep 描边 + --muted 图标 + 999rpx 圆角),
|
||||
但固定宽高、不参与 flex:1 的等宽分配——它是入口,不是订单动作;
|
||||
固定宽度后「取消 / 删除 / 再约」仍等宽平分剩余空间。
|
||||
84rpx 见方 = 与右侧幽灵按钮同高(18rpx 上下内距 + 30rpx 文字行高 + 3rpx 描边),
|
||||
圆形后上下沿齐平;内含 40rpx 图标,触控热区 42px 远高于 24px 下限 */
|
||||
.home-btn {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
border: 3rpx solid var(--sep);
|
||||
border-radius: 999rpx;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.home-btn:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* 首页图标:复用 custom-tab-bar 的同一份手绘 SVG(灰 #6F655C 档),
|
||||
与 tabBar「首页」tab 造型完全一致——同一个「首页」不在两处画成两种房子。
|
||||
TDesign 字体图标 home 是尖屋顶,tabBar 已弃用,此处同样不用 */
|
||||
.home-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTkgMzEgQzkgMjMuNSAxNi41IDE2LjUgMzIgOC41IEM0Ny41IDE2LjUgNTUgMjMuNSA1NSAzMSIgc3Ryb2tlPSIjNkY2NTVDIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjxyZWN0IHg9IjE0IiB5PSIyOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjI2IiByeD0iNyIgc3Ryb2tlPSIjNkY2NTVDIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjcgNTQgVjQ2IGE1IDUgMCAwIDEgMTAgMCBWNTQiIHN0cm9rZT0iIzZGNjU1QyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L3N2Zz4=");
|
||||
}
|
||||
|
||||
/* 按钮等宽铺满:与同页弹窗脚(.popup-btn 的 flex:1)同一套排布,
|
||||
热区也更大;单个按钮时即整条通栏主操作 */
|
||||
.action-btn {
|
||||
|
||||
@@ -188,5 +188,10 @@ Page({
|
||||
onTapRecord(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({ url: `/pages/escort/recorddetail?id=${id}` })
|
||||
},
|
||||
|
||||
// 回首页:首页是 tabBar 页,必须走 switchTab,navigateTo 跳不过去
|
||||
onGoHome() {
|
||||
wx.switchTab({ url: '/pages/home/index' })
|
||||
}
|
||||
})
|
||||
|
||||
@@ -114,4 +114,15 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 返回首页:本页没有底部动作栏,不额外立一条只有图标的空底栏,
|
||||
首页入口做成左下角悬浮圆钮;首页是 tabBar 页,必须走 switchTab -->
|
||||
<view
|
||||
class="home-fab"
|
||||
aria-role="button"
|
||||
aria-label="返回首页"
|
||||
bindtap="onGoHome"
|
||||
>
|
||||
<view class="home-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -24,7 +24,8 @@ page {
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
||||
/* 底部多留 110rpx:给左下角悬浮的首页圆钮让位,最后一条不被盖住 */
|
||||
padding: 0 32rpx calc(150rpx + env(safe-area-inset-bottom));
|
||||
/* 左右滑动切换的视觉反馈:跟手期间由 .dragging 关闭过渡做到即时响应,
|
||||
松手后恢复过渡,内容弹回原位 */
|
||||
transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
@@ -298,4 +299,39 @@ page {
|
||||
.no-more-text {
|
||||
font-size: 24rpx;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* ===== 返回首页:左下角悬浮圆钮 =====
|
||||
本页没有底部动作栏,不额外立一条只有图标的空底栏,改成悬浮圆钮:
|
||||
白面 + 发丝边 + 中性紧阴影,从滚动的卡片上拎起来,滚动时不丢入口;
|
||||
90rpx 见方、40rpx 图标,触控热区 45px 高于 24px 下限 */
|
||||
.home-fab {
|
||||
position: fixed;
|
||||
left: 32rpx;
|
||||
bottom: calc(32rpx + env(safe-area-inset-bottom));
|
||||
z-index: 100;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border: 3rpx solid var(--sep);
|
||||
border-radius: 999rpx;
|
||||
background: var(--white);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.home-fab:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* 首页图标:复用 custom-tab-bar 的同一份手绘 SVG(灰 #6F655C 档),
|
||||
与 tabBar「首页」tab 造型完全一致——同一个「首页」不在两处画成两种房子 */
|
||||
.home-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTkgMzEgQzkgMjMuNSAxNi41IDE2LjUgMzIgOC41IEM0Ny41IDE2LjUgNTUgMjMuNSA1NSAzMSIgc3Ryb2tlPSIjNkY2NTVDIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjxyZWN0IHg9IjE0IiB5PSIyOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjI2IiByeD0iNyIgc3Ryb2tlPSIjNkY2NTVDIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMjcgNTQgVjQ2IGE1IDUgMCAwIDEgMTAgMCBWNTQiIHN0cm9rZT0iIzZGNjU1QyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L3N2Zz4=");
|
||||
}
|
||||
Reference in New Issue
Block a user