修改界面中,临时提交
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
// pages/escort/guide.js
|
||||
|
||||
// 人工客服电话:与首页、关于我们保持一致
|
||||
const SERVICE_PHONE = '18618162956'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
// 服务流程:与 itemdetail 的「服务流程」同构,这里只描述通用环节
|
||||
steps: [{
|
||||
title: '线上预约',
|
||||
desc: '选择服务项目,填写就诊医院、科室与时间'
|
||||
},
|
||||
{
|
||||
title: '需求确认',
|
||||
desc: '客服电话核对就诊信息与特殊需求'
|
||||
},
|
||||
{
|
||||
title: '陪诊师接单',
|
||||
desc: '按需求匹配陪诊师,出发前与您联系'
|
||||
},
|
||||
{
|
||||
title: '全程陪同',
|
||||
desc: '取号、缴费、检查、取药全程有人陪'
|
||||
},
|
||||
{
|
||||
title: '服务完成',
|
||||
desc: '确认服务结果,客服回访并处理售后'
|
||||
}
|
||||
],
|
||||
// 就诊前准备:到院前建议提前备齐的材料
|
||||
preparations: [
|
||||
'就诊人身份证、医保卡(或电子医保凭证)',
|
||||
'既往病历、检查报告与影像资料',
|
||||
'需要空腹的项目,就诊当天请勿进食进水',
|
||||
'长期服用的药物清单,方便医生了解用药情况',
|
||||
'提前与陪诊师确认医院、院区与集合地点'
|
||||
],
|
||||
// 温馨提示:通用提醒,不涉及具体退款或收费规则
|
||||
tips: [
|
||||
'建议比预约时间提前 10-15 分钟到达集合点',
|
||||
'贵重物品与重要证件请自行随身保管',
|
||||
'就诊时间或需求有变化,请尽早联系客服调整'
|
||||
]
|
||||
},
|
||||
|
||||
// 下一步:进入陪诊服务列表
|
||||
goToServiceList() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/escort/itemlist'
|
||||
})
|
||||
},
|
||||
|
||||
// 兜底出口:仍有疑问可直接拨打客服电话
|
||||
goToContact() {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: SERVICE_PHONE
|
||||
})
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊指南', // 转发标题
|
||||
path: '/pages/escort/guide'
|
||||
}
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '暖橙陪诊 · 陪诊指南'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "陪诊指南",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--pages/escort/guide.wxml-->
|
||||
<view class="page-bg">
|
||||
<view class="container">
|
||||
|
||||
<!-- 头部:小色带 + 白底(内页规范,不做整块主色面板) -->
|
||||
<view class="page-header">
|
||||
<view class="header-accent"></view>
|
||||
<text class="header-title">陪诊指南</text>
|
||||
<text class="header-subtitle">第一次用陪诊?三分钟看懂全流程</text>
|
||||
</view>
|
||||
|
||||
<!-- ① 服务流程:下单到完成的通用环节 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="list" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">服务流程</text>
|
||||
</view>
|
||||
<view class="step-list">
|
||||
<view class="step-item" wx:for="{{ steps }}" wx:key="title">
|
||||
<view class="step-index">{{ index + 1 }}</view>
|
||||
<view class="step-body">
|
||||
<text class="step-title">{{ item.title }}</text>
|
||||
<text class="step-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ② 就诊前准备:到院前建议备齐的材料 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="info-circle" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">就诊前准备</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ preparations }}" wx:key="*this">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ③ 温馨提示:通用注意事项,不涉及具体规则 -->
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view class="card-mark">
|
||||
<t-icon name="error-circle" size="26rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<text class="card-title">温馨提示</text>
|
||||
</view>
|
||||
<view class="dot-list">
|
||||
<view class="dot-item" wx:for="{{ tips }}" wx:key="*this">
|
||||
<view class="dot"></view>
|
||||
<text class="dot-text">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部出口:看完指南直接去下单,兜底可转人工客服 -->
|
||||
<view class="guide-cta" bindtap="goToServiceList">
|
||||
<text class="guide-cta-text">查看陪诊服务</text>
|
||||
<t-icon name="chevron-right" size="28rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="guide-help" bindtap="goToContact">
|
||||
<t-icon name="call" size="28rpx" color="#9A3412" />
|
||||
<text class="guide-help-text">还有疑问?联系人工客服</text>
|
||||
</view>
|
||||
|
||||
<view class="footer-space"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,207 @@
|
||||
/* pages/escort/guide.wxss
|
||||
内页规范:小色带 + 白底,不用整块主色面板;
|
||||
卡片沿用首页「发丝边 + 紧阴影」,与首页保持同一套视觉语言 */
|
||||
page {
|
||||
--brand-strong: #C2410C; /* 实心块/按钮:白字 4.69:1,过 AA 正文 */
|
||||
--brand-soft: #FFF4E8; /* 图标衬底、标签底 */
|
||||
--brand-line: #FFE0C2; /* 浅橙衬底描边 */
|
||||
--brand-ink: #9A3412; /* 浅橙衬底上的文字/图标:6.8:1,过 AA */
|
||||
|
||||
--ink: #2B2521;
|
||||
--ink-2: #4A4038;
|
||||
--muted: #7A7068; /* 白底 4.8:1,过 AA 正文 */
|
||||
--line: #F0E9E0; /* 米色发丝边 */
|
||||
--paper: #FAF6F0; /* 暖白纸面 */
|
||||
--white: #FFFFFF;
|
||||
|
||||
--shadow-card: 0 2rpx 10rpx rgba(63, 43, 25, 0.04);
|
||||
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.page-bg {
|
||||
min-height: 100vh;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
/* ===== 头部:小色带 + 深墨标题 ===== */
|
||||
.page-header {
|
||||
padding: 24rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.header-accent {
|
||||
width: 64rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
background: var(--brand-strong);
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: block;
|
||||
margin-top: 20rpx;
|
||||
font-size: 46rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 通用白卡 ===== */
|
||||
.card {
|
||||
margin-top: 32rpx;
|
||||
padding: 28rpx 26rpx;
|
||||
border-radius: 28rpx;
|
||||
background: var(--white);
|
||||
border: 2rpx solid var(--line);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
|
||||
.card-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-mark {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 12rpx;
|
||||
background: var(--brand-strong);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-left: 14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
/* ===== 服务流程:左侧序号 + 递进条目 ===== */
|
||||
.step-item {
|
||||
display: flex;
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.step-index {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.step-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.step-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.step-desc {
|
||||
margin-top: 8rpx;
|
||||
font-size: 26rpx;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* ===== 要点列表 ===== */
|
||||
.dot-item {
|
||||
display: flex;
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
background: var(--brand-strong);
|
||||
margin: 16rpx 18rpx 0 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dot-text {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: var(--ink-2);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ===== 底部出口 ===== */
|
||||
.guide-cta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 48rpx;
|
||||
padding: 26rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--brand-strong);
|
||||
box-shadow: 0 6rpx 16rpx rgba(194, 65, 12, 0.22);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.guide-cta:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.guide-cta-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--white);
|
||||
letter-spacing: 2rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.guide-help {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 24rpx;
|
||||
padding: 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background: var(--brand-soft);
|
||||
border: 2rpx solid var(--brand-line);
|
||||
}
|
||||
|
||||
.guide-help:active {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.guide-help-text {
|
||||
margin-left: 12rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.footer-space {
|
||||
height: 60rpx;
|
||||
}
|
||||
@@ -15,6 +15,8 @@ Page({
|
||||
},
|
||||
totalPrice: '0.00',
|
||||
showOrderPopup: false,
|
||||
profiles: [], // 健康档案里已保存的就诊人
|
||||
selectedProfileId: '', // 当前选中的就诊人档案 ID,为空表示手动填写
|
||||
patientName: '',
|
||||
patientPhone: '',
|
||||
province: '',
|
||||
@@ -48,6 +50,13 @@ Page({
|
||||
this.loadServiceDetail(serviceId)
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 从"新增就诊人"页面返回时,弹窗还开着就刷新一次可选的就诊人
|
||||
if (this.data.showOrderPopup) {
|
||||
this.loadProfiles()
|
||||
}
|
||||
},
|
||||
|
||||
loadServiceDetail(id) {
|
||||
const app = getApp()
|
||||
let service = null
|
||||
@@ -86,8 +95,57 @@ Page({
|
||||
this.setData({
|
||||
patientName: user.profile?.name || '',
|
||||
patientPhone: user.profile?.mobile || '',
|
||||
selectedProfileId: '',
|
||||
showOrderPopup: true
|
||||
})
|
||||
|
||||
this.loadProfiles()
|
||||
},
|
||||
|
||||
// 读取已保存的就诊人,供弹窗内一键选择
|
||||
loadProfiles() {
|
||||
API.healthProfile.getMyProfiles({
|
||||
page: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return
|
||||
}
|
||||
const list = ((res.data && res.data.list) || []).map((item) => ({
|
||||
_id: item._id,
|
||||
name: item.profile?.name || '',
|
||||
mobile: item.profile?.mobile || ''
|
||||
}))
|
||||
this.setData({
|
||||
profiles: list
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取就诊人列表失败', err)
|
||||
})
|
||||
},
|
||||
|
||||
// 选择就诊人:自动带入姓名与联系电话
|
||||
onSelectProfile(e) {
|
||||
const id = e.currentTarget.dataset.id
|
||||
const profile = this.data.profiles.find((item) => item._id === id)
|
||||
if (!profile) {
|
||||
return
|
||||
}
|
||||
|
||||
this.setData({
|
||||
selectedProfileId: id,
|
||||
patientName: profile.name,
|
||||
patientPhone: profile.mobile
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到健康档案新增就诊人
|
||||
goToAddProfile() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/health/profileedit'
|
||||
})
|
||||
},
|
||||
|
||||
closeOrderPopup() {
|
||||
@@ -96,15 +154,18 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 手动修改姓名/电话后,不再与所选档案对应,清空选择避免存档信息不一致
|
||||
onPatientNameChange(e) {
|
||||
this.setData({
|
||||
patientName: e.detail.value
|
||||
patientName: e.detail.value,
|
||||
selectedProfileId: ''
|
||||
})
|
||||
},
|
||||
|
||||
onPatientPhoneChange(e) {
|
||||
this.setData({
|
||||
patientPhone: e.detail.value
|
||||
patientPhone: e.detail.value,
|
||||
selectedProfileId: ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -256,6 +317,11 @@ Page({
|
||||
}
|
||||
}
|
||||
|
||||
// 选择了已保存的就诊人时,一并记录档案 ID
|
||||
if (this.data.selectedProfileId) {
|
||||
orderData.healthProfileId = this.data.selectedProfileId
|
||||
}
|
||||
|
||||
wx.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
@@ -292,6 +358,7 @@ Page({
|
||||
|
||||
resetForm() {
|
||||
this.setData({
|
||||
selectedProfileId: '',
|
||||
patientName: '',
|
||||
patientPhone: '',
|
||||
province: '',
|
||||
|
||||
@@ -96,6 +96,26 @@
|
||||
</view>
|
||||
</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>
|
||||
<text class="patient-chip-phone">{{item.mobile}}</text>
|
||||
</view>
|
||||
<view class="patient-chip patient-chip-add" bindtap="goToAddProfile">
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 就诊人姓名 -->
|
||||
<view class="order-row">
|
||||
<text class="order-label">就诊人姓名</text>
|
||||
|
||||
@@ -493,3 +493,63 @@ page {
|
||||
.popup-submit-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 就诊人选择 */
|
||||
.patient-scroll {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.patient-chips {
|
||||
display: inline-flex;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.patient-chip {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
min-width: 160rpx;
|
||||
padding: 14rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #F9FAFB;
|
||||
border: 2rpx solid #F3F4F6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.patient-chip.active {
|
||||
background: #FDF8EE;
|
||||
border-color: #D4A853;
|
||||
}
|
||||
|
||||
.patient-chip-name {
|
||||
font-size: 26rpx;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.patient-chip.active .patient-chip-name {
|
||||
color: #D4A853;
|
||||
}
|
||||
|
||||
.patient-chip-phone {
|
||||
font-size: 22rpx;
|
||||
color: #9CA3AF;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.patient-chip-add {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.add-profile-tip {
|
||||
width: 100%;
|
||||
padding: 18rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FDF8EE;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.add-profile-tip-text {
|
||||
font-size: 24rpx;
|
||||
color: #A1864B;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "助诊服务"
|
||||
"navigationBarTitleText": "陪诊服务"
|
||||
}
|
||||
Reference in New Issue
Block a user