diff --git a/app.json b/app.json
index 584abeb..963839f 100644
--- a/app.json
+++ b/app.json
@@ -6,6 +6,7 @@
"pages/escort/itemlist",
"pages/escort/recordlist",
"pages/escort/agreement",
+ "pages/escort/recorddetail",
"pages/mine/mine",
"pages/mine/about",
"pages/hospital/contact",
diff --git a/app.wxss b/app.wxss
index 03d9ce4..6dd876b 100644
--- a/app.wxss
+++ b/app.wxss
@@ -17,7 +17,7 @@ page {
--td-brand-color-light: var(--td-brand-color-1);
--td-brand-color-light-active: var(--td-brand-color-2);
background-color: #FAF6F1;
- font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
+ font-family: -apple-system, PingFang SC, Microsoft YaHei, sans-serif;
}
.container {
diff --git a/pages/ai/aichat.wxml b/pages/ai/aichat.wxml
index 7e9487c..a2a9ff2 100644
--- a/pages/ai/aichat.wxml
+++ b/pages/ai/aichat.wxml
@@ -120,4 +120,9 @@
+
+
+
+ 本服务为AI生成内容,结果仅供参考。
+
\ No newline at end of file
diff --git a/pages/ai/aichat.wxss b/pages/ai/aichat.wxss
index 0e76f7a..d617f60 100644
--- a/pages/ai/aichat.wxss
+++ b/pages/ai/aichat.wxss
@@ -275,4 +275,17 @@
.send-btn.active {
background: linear-gradient(135deg, #FF9B33 0%, #FF7A33 100%);
+}
+
+/* AI声明 */
+.ai-disclaimer {
+ padding: 12rpx 24rpx;
+ padding-bottom: calc(12rpx + env(safe-area-inset-bottom));
+ text-align: center;
+ background-color: #F5F5F5;
+}
+
+.ai-disclaimer text {
+ font-size: 22rpx;
+ color: #CCCCCC;
}
\ No newline at end of file
diff --git a/pages/escort/itemdetail.js b/pages/escort/itemdetail.js
index 7799f96..05e6120 100644
--- a/pages/escort/itemdetail.js
+++ b/pages/escort/itemdetail.js
@@ -237,15 +237,13 @@ Page({
escort: {
serviceId: service.id,
serviceName: service.title,
+ sexRequirement: sex
},
hospital: {
province: province,
name: hospital.trim(),
department: department.trim(),
},
- attendant: {
- sex: sex,
- },
schedule: {
date: appointmentDate,
startTime: appointmentTime
@@ -274,6 +272,7 @@ Page({
showOrderPopup: false
})
this.resetForm()
+ wx.navigateTo({url: '/pages/escort/recordlist?tab=pending'})
} else {
wx.showToast({
title: data.msg || '下单失败',
diff --git a/pages/escort/recorddetail.js b/pages/escort/recorddetail.js
new file mode 100644
index 0000000..f669b34
--- /dev/null
+++ b/pages/escort/recorddetail.js
@@ -0,0 +1,396 @@
+const API = require('../../utils/api.js')
+
+const STATUS_MAP = {
+ pending: { text: '待确认', color: '#F59E0B', bg: '#FEF3C7', gradient: 'linear-gradient(135deg, #F59E0B 0%, #D97706 100%)', icon: 'time', desc: '您的订单已提交,等待确认中' },
+ confirmed: { text: '已确认', color: '#3B82F6', bg: '#DBEAFE', gradient: 'linear-gradient(135deg, #3B82F6 0%, #2563EB 100%)', icon: 'check-circle', desc: '订单已确认,陪诊员将准时为您服务' },
+ in_progress: { text: '进行中', color: '#8B5CF6', bg: '#EDE9FE', gradient: 'linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%)', icon: 'play-circle', desc: '陪诊服务正在进行中' },
+ completed: { text: '已完成', color: '#10B981', bg: '#D1FAE5', gradient: 'linear-gradient(135deg, #10B981 0%, #059669 100%)', icon: 'check-circle-filled', desc: '陪诊服务已完成,感谢您的使用' },
+ cancelled: { text: '已取消', color: '#6B7280', bg: '#F3F4F6', gradient: 'linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%)', icon: 'close-circle', desc: '该订单已取消' }
+}
+
+const PAYMENT_STATUS_MAP = {
+ unpaid: { text: '未支付', color: '#F59E0B', bg: '#FEF3C7' },
+ partial: { text: '部分支付', color: '#F59E0B', bg: '#FEF3C7' },
+ paid: { text: '已支付', color: '#10B981', bg: '#D1FAE5' },
+ refunded: { text: '已退款', color: '#6B7280', bg: '#F3F4F6' }
+}
+
+const SEX_MAP = {
+ male: '男',
+ female: '女'
+}
+
+const ATTENDANT_SEX_MAP = {
+ none: '不限',
+ male: '男',
+ female: '女'
+}
+
+Page({
+ data: {
+ recordId: '',
+ record: {},
+ loading: true,
+ editing: false,
+ editPatientNote: '',
+ editingPatient: false,
+ editPatient: {},
+ showCancelPopup: false,
+ cancelReason: '',
+ cancelReasons: [
+ '临时有事,无法前往',
+ '病情好转,无需陪诊',
+ '医院停诊/改期',
+ '陪诊员无法到达',
+ '其他原因'
+ ]
+ },
+
+ onLoad(options) {
+ const id = options.id
+ if (!id) {
+ wx.showToast({ title: '参数错误', icon: 'none' })
+ setTimeout(() => wx.navigateBack(), 1500)
+ return
+ }
+ this.setData({ recordId: id })
+ this.loadRecord(id)
+ },
+
+ onShow() {
+ if (this.data.recordId) {
+ this.loadRecord(this.data.recordId)
+ }
+ },
+
+ onPullDownRefresh() {
+ if (this.data.recordId) {
+ this.loadRecord(this.data.recordId).finally(() => {
+ wx.stopPullDownRefresh()
+ })
+ }
+ },
+
+ loadRecord(id) {
+ this.setData({ loading: true })
+ return API.escort.getRecordById(id)
+ .then((res) => {
+ if (res.code === 0 && res.data) {
+ const record = this.formatRecord(res.data.record)
+ this.setData({ record })
+ } else {
+ wx.showToast({ title: res.msg || '加载失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ .finally(() => {
+ this.setData({ loading: false })
+ })
+ },
+
+ formatRecord(item) {
+ const statusInfo = STATUS_MAP[item.status] || STATUS_MAP.pending
+ const paymentInfo = PAYMENT_STATUS_MAP[item.payment?.status] || PAYMENT_STATUS_MAP.unpaid
+
+ return {
+ _id: item._id,
+ patientName: item.patient?.name || '',
+ patientSexText: SEX_MAP[item.patient?.sex] || '',
+ patientAge: item.patient?.age || 0,
+ patientWeight: item.patient?.weight || 0,
+ patientHeight: item.patient?.height || 0,
+ patientMobile: item.patient?.mobile || '',
+ patientIdnumber: item.patient?.idnumber || '',
+ hospitalProvince: item.hospital?.province || '',
+ hospitalName: item.hospital?.name || '',
+ hospitalAddress: item.hospital?.address || '',
+ hospitalDepartment: item.hospital?.department || '',
+ hospitalDoctor: item.hospital?.doctor || '',
+ medicalRecordNo: item.hospital?.medicalRecordNo || '',
+ scheduleDate: item.schedule?.date ? this.formatDate(item.schedule.date) : '',
+ scheduleStartTime: item.schedule?.startTime || '',
+ scheduleEndTime: item.schedule?.endTime || '',
+ scheduleDuration: item.schedule?.duration || 0,
+ escortServiceName: item.escort?.serviceName || '',
+ attendantName: item.attendant?.name || '',
+ attendantSexText: ATTENDANT_SEX_MAP[item.escort?.sexRequirement] || '',
+ totalFee: (item.payment?.totalFee || 0).toFixed(2),
+ paidFee: (item.payment?.paidFee || 0).toFixed(2),
+ paymentStatus: item.payment?.status || 'unpaid',
+ paymentStatusText: paymentInfo.text,
+ paymentStatusColor: paymentInfo.color,
+ paymentStatusBg: paymentInfo.bg,
+ patientNote: item.notes?.patientNote || '',
+ escortNote: item.notes?.escortNote || '',
+ medicalSummary: item.notes?.medicalSummary || '',
+ status: item.status,
+ statusText: statusInfo.text,
+ statusColor: statusInfo.color,
+ statusBg: statusInfo.bg,
+ statusGradient: statusInfo.gradient,
+ statusIcon: statusInfo.icon,
+ statusDesc: statusInfo.desc,
+ createTime: item.meta?.createtime ? this.formatDateTime(item.meta.createtime) : '',
+ updateTime: item.meta?.updatetime ? this.formatDateTime(item.meta.updatetime) : ''
+ }
+ },
+
+ formatDate(dateStr) {
+ const d = new Date(dateStr)
+ const year = d.getFullYear()
+ const month = String(d.getMonth() + 1).padStart(2, '0')
+ const day = String(d.getDate()).padStart(2, '0')
+ return `${year}-${month}-${day}`
+ },
+
+ formatDateTime(dateStr) {
+ const d = new Date(dateStr)
+ const year = d.getFullYear()
+ const month = String(d.getMonth() + 1).padStart(2, '0')
+ const day = String(d.getDate()).padStart(2, '0')
+ const hour = String(d.getHours()).padStart(2, '0')
+ const minute = String(d.getMinutes()).padStart(2, '0')
+ return `${year}-${month}-${day} ${hour}:${minute}`
+ },
+
+ onCallPatient() {
+ const mobile = this.data.record.patientMobile
+ if (!mobile || mobile === '--') return
+ wx.makePhoneCall({ phoneNumber: mobile })
+ },
+
+ onCallService() {
+ wx.makePhoneCall({ phoneNumber: '18618162956' })
+ },
+
+ onEditPatientNote() {
+ this.setData({
+ editing: true,
+ editPatientNote: this.data.record.patientNote || ''
+ })
+ },
+
+ onPatientNoteInput(e) {
+ this.setData({ editPatientNote: e.detail.value })
+ },
+
+ onCancelEdit() {
+ this.setData({ editing: false })
+ },
+
+ onSavePatientNote() {
+ const note = this.data.editPatientNote.trim()
+ wx.showLoading({ title: '保存中...' })
+ API.escort.updateRecord(this.data.recordId, {
+ 'notes.patientNote': note
+ })
+ .then((res) => {
+ wx.hideLoading()
+ if (res.code === 0) {
+ wx.showToast({ title: '保存成功', icon: 'success' })
+ this.setData({
+ editing: false,
+ 'record.patientNote': note
+ })
+ } else {
+ wx.showToast({ title: res.msg || '保存失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.hideLoading()
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ },
+
+ onEditPatientInfo() {
+ const record = this.data.record
+ this.setData({
+ editingPatient: true,
+ editPatient: {
+ name: record.patientName || '',
+ sex: record.patientSexText === '男' ? 'male' : record.patientSexText === '女' ? 'female' : '',
+ age: record.patientAge ? String(record.patientAge) : '',
+ weight: record.patientWeight ? String(record.patientWeight) : '',
+ height: record.patientHeight ? String(record.patientHeight) : '',
+ mobile: record.patientMobile || '',
+ idnumber: record.patientIdnumber || ''
+ }
+ })
+ },
+
+ onPatientInfoInput(e) {
+ const field = e.currentTarget.dataset.field
+ const value = e.detail.value
+ this.setData({
+ [`editPatient.${field}`]: value
+ })
+ },
+
+ onPatientSexChange(e) {
+ const value = e.currentTarget.dataset.value
+ this.setData({
+ 'editPatient.sex': value
+ })
+ },
+
+ onCancelEditPatientInfo() {
+ this.setData({ editingPatient: false })
+ },
+
+ onSavePatientInfo() {
+ const patient = this.data.editPatient
+ if (!patient.name.trim()) {
+ wx.showToast({ title: '请输入姓名', icon: 'none' })
+ return
+ }
+ if (!patient.mobile.trim()) {
+ wx.showToast({ title: '请输入联系电话', icon: 'none' })
+ return
+ }
+
+ wx.showLoading({ title: '保存中...' })
+ API.escort.updateRecord(this.data.recordId, {
+ 'patient.name': patient.name.trim(),
+ 'patient.sex': patient.sex,
+ 'patient.age': parseInt(patient.age) || 0,
+ 'patient.weight': parseFloat(patient.weight) || 0,
+ 'patient.height': parseFloat(patient.height) || 0,
+ 'patient.mobile': patient.mobile.trim(),
+ 'patient.idnumber': patient.idnumber.trim()
+ })
+ .then((res) => {
+ wx.hideLoading()
+ if (res.code === 0) {
+ wx.showToast({ title: '保存成功', icon: 'success' })
+ this.setData({ editingPatient: false })
+ this.loadRecord(this.data.recordId)
+ } else {
+ wx.showToast({ title: res.msg || '保存失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.hideLoading()
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ },
+
+ onCancelOrder() {
+ this.setData({
+ showCancelPopup: true,
+ cancelReason: ''
+ })
+ },
+
+ onCloseCancelPopup() {
+ this.setData({ showCancelPopup: false })
+ },
+
+ onSelectCancelReason(e) {
+ this.setData({ cancelReason: e.currentTarget.dataset.reason })
+ },
+
+ onConfirmCancel() {
+ if (!this.data.cancelReason) {
+ wx.showToast({ title: '请选择取消原因', icon: 'none' })
+ return
+ }
+
+ wx.showLoading({ title: '处理中...' })
+ API.escort.updateStatus(this.data.recordId, {
+ status: 'cancelled',
+ reason: this.data.cancelReason
+ })
+ .then((res) => {
+ wx.hideLoading()
+ if (res.code === 0) {
+ wx.showToast({ title: '订单已取消', icon: 'success' })
+ this.setData({ showCancelPopup: false })
+ this.loadRecord(this.data.recordId)
+ } else {
+ wx.showToast({ title: res.msg || '操作失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.hideLoading()
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ },
+
+ onPayOrder() {
+ wx.showToast({ title: '支付功能开发中', icon: 'none' })
+ },
+
+ onConfirmComplete() {
+ wx.showModal({
+ title: '确认完成',
+ content: '确认陪诊服务已完成?',
+ confirmColor: '#6B8E7B',
+ success: (res) => {
+ if (res.confirm) {
+ wx.showLoading({ title: '处理中...' })
+ API.escort.updateStatus(this.data.recordId, {
+ status: 'completed'
+ })
+ .then((res) => {
+ wx.hideLoading()
+ if (res.code === 0) {
+ wx.showToast({ title: '已确认完成', icon: 'success' })
+ this.loadRecord(this.data.recordId)
+ } else {
+ wx.showToast({ title: res.msg || '操作失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.hideLoading()
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ }
+ }
+ })
+ },
+
+ onDeleteOrder() {
+ wx.showModal({
+ title: '删除订单',
+ content: '确定要删除该订单吗?删除后不可恢复。',
+ confirmColor: '#EF4444',
+ success: (res) => {
+ if (res.confirm) {
+ wx.showLoading({ title: '删除中...' })
+ API.escort.deleteRecord(this.data.recordId)
+ .then((res) => {
+ wx.hideLoading()
+ if (res.code === 0) {
+ wx.showToast({ title: '删除成功', icon: 'success' })
+ setTimeout(() => {
+ wx.navigateBack()
+ }, 1500)
+ } else {
+ wx.showToast({ title: res.msg || '删除失败', icon: 'none' })
+ }
+ })
+ .catch(() => {
+ wx.hideLoading()
+ wx.showToast({ title: '网络请求失败', icon: 'none' })
+ })
+ }
+ }
+ })
+ },
+
+ onRebook() {
+ const serviceId = this.data.record.escortServiceName
+ wx.navigateTo({
+ url: `/pages/escort/itemlist`
+ })
+ },
+
+ onShareAppMessage() {
+ return {
+ title: '暖橙陪诊 - 专业陪诊服务',
+ path: '/pages/home/index'
+ }
+ }
+})
diff --git a/pages/escort/recorddetail.json b/pages/escort/recorddetail.json
new file mode 100644
index 0000000..d25b6a3
--- /dev/null
+++ b/pages/escort/recorddetail.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "陪诊记录详情",
+ "usingComponents": {},
+ "enablePullDownRefresh": true,
+ "backgroundTextStyle": "dark"
+}
diff --git a/pages/escort/recorddetail.wxml b/pages/escort/recorddetail.wxml
new file mode 100644
index 0000000..8f313dd
--- /dev/null
+++ b/pages/escort/recorddetail.wxml
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+
+
+ 就诊人信息
+
+
+ 修改
+
+
+
+
+ 姓名
+ {{record.patientName || '--'}}
+
+
+ 性别
+ {{record.patientSexText || '--'}}
+
+
+ 年龄
+ {{record.patientAge ? record.patientAge + '岁' : '--'}}
+
+
+ 体重
+ {{record.patientWeight ? record.patientWeight + 'kg' : '--'}}
+
+
+ 身高
+ {{record.patientHeight ? record.patientHeight + 'cm' : '--'}}
+
+
+ 联系电话
+ {{record.patientMobile || '--'}}
+
+
+ 身份证号
+ {{record.patientIdnumber}}
+
+
+
+
+ 姓名
+
+
+
+ 性别
+
+ 男
+ 女
+
+
+
+ 年龄
+
+
+
+ 体重(kg)
+
+
+
+ 身高(cm)
+
+
+
+ 联系电话
+
+
+
+ 身份证号
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 医院预约信息
+
+
+ 就诊省份
+ {{record.hospitalProvince || '--'}}
+
+
+ 就诊医院
+ {{record.hospitalName || '--'}}
+
+
+ 医院地址
+ {{record.hospitalAddress}}
+
+
+ 就诊科室
+ {{record.hospitalDepartment || '--'}}
+
+
+ 就诊医生
+ {{record.hospitalDoctor}}
+
+
+ 病历号
+ {{record.medicalRecordNo}}
+
+
+ 预约日期
+ {{record.scheduleDate || '--'}}
+
+
+ 预约时间
+ {{record.scheduleStartTime || '--'}}
+
+
+ 结束时间
+ {{record.scheduleEndTime}}
+
+
+ 陪诊时长
+ {{record.scheduleDuration}}分钟
+
+
+
+
+
+
+
+ 陪诊服务
+
+
+ 服务类型
+ {{record.escortServiceName || '陪诊服务'}}
+
+
+ 性别要求
+ {{record.escortSexRequirementText}}
+
+
+ 陪诊员
+ {{record.attendantName}}
+
+
+ 陪诊员性别
+ {{record.attendantSexText}}
+
+
+ 陪诊员电话
+ {{record.attendantMobile}}
+
+
+
+
+
+
+
+ 陪诊需求与症状
+
+
+ 修改
+
+
+
+
+ {{record.patientNote || '暂无备注'}}
+
+
+
+
+
+
+ 陪诊记录
+ {{record.escortNote}}
+
+
+ 就诊摘要
+ {{record.medicalSummary}}
+
+
+ 暂无备注信息,点击添加
+
+
+
+
+
+
+
+
+
+
+ 费用信息
+
+
+ 服务费用
+ ¥{{record.totalFee}}
+
+
+ 已支付
+ ¥{{record.paidFee}}
+
+
+ 支付状态
+
+ {{record.paymentStatusText}}
+
+
+
+
+
+
+
+
+ 订单信息
+
+
+ 订单编号
+ {{record._id || '--'}}
+
+
+ 订单状态
+
+ {{record.statusText}}
+
+
+
+ 创建时间
+ {{record.createTime || '--'}}
+
+
+ 更新时间
+ {{record.updateTime || '--'}}
+
+
+
+
+
+
+
+
+
+ 取消订单
+ 删除订单
+ 确认完成
+ 再次预约
+
+
+
+
+
+
+
diff --git a/pages/escort/recorddetail.wxss b/pages/escort/recorddetail.wxss
new file mode 100644
index 0000000..ab8cab4
--- /dev/null
+++ b/pages/escort/recorddetail.wxss
@@ -0,0 +1,575 @@
+page {
+ background-color: #FAF6F1;
+}
+
+.container {
+ min-height: 100vh;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+}
+
+/* 状态头部 */
+.status-header {
+ padding: 48rpx 32rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-radius: 0 0 32rpx 32rpx;
+}
+
+.status-main {
+ display: flex;
+ flex-direction: column;
+ gap: 12rpx;
+}
+
+.status-text {
+ font-size: 40rpx;
+ font-weight: 700;
+ color: #FFFFFF;
+}
+
+.status-desc {
+ font-size: 26rpx;
+ color: rgba(255, 255, 255, 0.8);
+}
+
+.status-icon-wrap {
+ opacity: 0.6;
+}
+
+/* 详情卡片 */
+.detail-card {
+ background: #FFFFFF;
+ margin: 24rpx 24rpx 0;
+ border-radius: 20rpx;
+ padding: 32rpx;
+ box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);
+}
+
+.card-title {
+ display: flex;
+ align-items: center;
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #1F2937;
+ margin-bottom: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #F3F4F6;
+}
+
+.card-icon {
+ color: #D4A853;
+ margin-right: 12rpx;
+}
+
+.card-edit-btn {
+ display: flex;
+ align-items: center;
+ gap: 6rpx;
+ margin-left: auto;
+}
+
+/* 信息行 */
+.info-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 16rpx 0;
+}
+
+.info-row + .info-row {
+ border-top: 1rpx solid #F9FAFB;
+}
+
+.info-label {
+ font-size: 26rpx;
+ color: #9CA3AF;
+ flex-shrink: 0;
+}
+
+.info-value {
+ font-size: 26rpx;
+ color: #374151;
+ text-align: right;
+ flex: 1;
+ margin-left: 24rpx;
+ word-break: break-all;
+}
+
+.info-value.phone {
+ color: #D4A853;
+}
+
+.info-value.fee {
+ color: #D4A853;
+ font-weight: 700;
+ font-size: 30rpx;
+}
+
+.info-value.order-id {
+ font-size: 24rpx;
+ color: #6B7280;
+ font-family: monospace;
+}
+
+/* 支付状态徽标 */
+.payment-badge {
+ font-size: 24rpx;
+ font-weight: 600;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+}
+
+/* 订单状态小徽标 */
+.status-badge-small {
+ font-size: 24rpx;
+ font-weight: 600;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+}
+
+/* 备注区域 */
+.note-section {
+ margin-bottom: 24rpx;
+}
+
+.note-section:last-child {
+ margin-bottom: 0;
+}
+
+.note-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 12rpx;
+}
+
+.note-label {
+ font-size: 26rpx;
+ color: #6B7280;
+ font-weight: 500;
+ margin-bottom: 8rpx;
+ display: block;
+}
+
+.note-edit-btn {
+ display: flex;
+ align-items: center;
+ gap: 6rpx;
+}
+
+.edit-text {
+ font-size: 24rpx;
+ color: #D4A853;
+}
+
+.note-content {
+ font-size: 28rpx;
+ color: #374151;
+ line-height: 1.7;
+ background: #F9FAFB;
+ padding: 20rpx;
+ border-radius: 12rpx;
+ display: block;
+}
+
+.note-textarea {
+ width: 100%;
+ min-height: 200rpx;
+ background: #F9FAFB;
+ border-radius: 12rpx;
+ padding: 20rpx;
+ font-size: 28rpx;
+ color: #1F2937;
+ box-sizing: border-box;
+ line-height: 1.7;
+}
+
+.input-placeholder {
+ color: #9CA3AF;
+}
+
+.note-actions {
+ display: flex;
+ justify-content: flex-end;
+ gap: 16rpx;
+ margin-top: 16rpx;
+}
+
+.note-btn {
+ font-size: 26rpx;
+ padding: 12rpx 32rpx;
+ border-radius: 12rpx;
+ border: none;
+ line-height: 1.5;
+}
+
+.note-btn.cancel {
+ background: #F3F4F6;
+ color: #6B7280;
+}
+
+.note-btn.confirm {
+ background: linear-gradient(135deg, #D4A853 0%, #D4A853 100%);
+ color: #FFFFFF;
+ font-weight: 600;
+}
+
+.note-btn::after {
+ border: none;
+}
+
+/* 编辑行 */
+.edit-row {
+ display: flex;
+ align-items: center;
+ padding: 16rpx 0;
+ border-top: 1rpx solid #F9FAFB;
+}
+
+.edit-label {
+ font-size: 26rpx;
+ color: #9CA3AF;
+ flex-shrink: 0;
+ width: 160rpx;
+}
+
+.edit-input {
+ flex: 1;
+ font-size: 26rpx;
+ color: #374151;
+ text-align: right;
+ margin-left: 24rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+}
+
+.edit-radio-group {
+ flex: 1;
+ display: flex;
+ justify-content: flex-end;
+ gap: 24rpx;
+ margin-left: 24rpx;
+}
+
+.edit-radio {
+ font-size: 26rpx;
+ color: #6B7280;
+ padding: 8rpx 24rpx;
+ border-radius: 8rpx;
+ border: 1rpx solid #E5E7EB;
+ background: #FFFFFF;
+}
+
+.edit-radio.active {
+ color: #D4A853;
+ border-color: #D4A853;
+ background: #FEF3C7;
+}
+
+.edit-actions {
+ display: flex;
+ justify-content: flex-end;
+ gap: 16rpx;
+ margin-top: 24rpx;
+ padding-top: 16rpx;
+ border-top: 1rpx solid #F3F4F6;
+}
+
+.edit-btn {
+ font-size: 26rpx;
+ padding: 12rpx 32rpx;
+ border-radius: 12rpx;
+ border: none;
+ line-height: 1.5;
+}
+
+.edit-btn.cancel {
+ background: #F3F4F6;
+ color: #6B7280;
+}
+
+.edit-btn.confirm {
+ background: linear-gradient(135deg, #D4A853 0%, #D4A853 100%);
+ color: #FFFFFF;
+ font-weight: 600;
+}
+
+.edit-btn::after {
+ border: none;
+}
+
+/* 空备注 */
+.empty-note {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 24rpx 20rpx;
+ background: #F9FAFB;
+ border-radius: 12rpx;
+}
+
+.empty-note-text {
+ font-size: 26rpx;
+ color: #9CA3AF;
+}
+
+.add-note-btn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 56rpx;
+ height: 56rpx;
+ background: #FEF3C7;
+ border-radius: 50%;
+}
+
+/* 底部占位 */
+.bottom-placeholder {
+ height: 160rpx;
+}
+
+/* 底部操作栏 */
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background: #FFFFFF;
+ padding: 20rpx 32rpx;
+ padding-bottom: calc(20rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
+ z-index: 100;
+}
+
+.bottom-left {
+ display: flex;
+ align-items: center;
+ gap: 32rpx;
+}
+
+.action-icon-btn {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4rpx;
+}
+
+.action-icon-label {
+ font-size: 20rpx;
+ color: #6B7280;
+}
+
+.bottom-right {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: 16rpx;
+ flex: 1;
+ flex-wrap: nowrap;
+}
+
+.action-btn {
+ font-size: 26rpx;
+ font-weight: 600;
+ padding: 16rpx 20rpx;
+ border-radius: 16rpx;
+ line-height: 1.5;
+ min-width: 0;
+ white-space: nowrap;
+ text-align: center;
+}
+
+.cancel-btn {
+ background: #F3F4F6;
+ color: #6B7280;
+}
+
+.pay-btn {
+ background: linear-gradient(135deg, #D4A853 0%, #D4A853 100%);
+ color: #FFFFFF;
+}
+
+.confirm-btn {
+ background: linear-gradient(135deg, #6B8E7B 0%, #6B8E7B 100%);
+ color: #FFFFFF;
+}
+
+.rebook-btn {
+ background: linear-gradient(135deg, #6B8E7B 0%, #6B8E7B 100%);
+ color: #FFFFFF;
+}
+
+/* 弹窗遮罩 */
+.popup-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.5);
+ z-index: 200;
+ opacity: 0;
+ visibility: hidden;
+ transition: opacity 0.3s, visibility 0.3s;
+}
+
+.popup-mask.show {
+ opacity: 1;
+ visibility: visible;
+}
+
+/* 弹窗内容 */
+.popup-content {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: #FFFFFF;
+ border-radius: 24rpx 24rpx 0 0;
+ z-index: 201;
+ transform: translateY(100%);
+ transition: transform 0.3s ease-out;
+ display: flex;
+ flex-direction: column;
+ max-height: 70vh;
+}
+
+.popup-content.show {
+ transform: translateY(0);
+}
+
+.popup-header {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 32rpx;
+ position: relative;
+ border-bottom: 1rpx solid #F3F4F6;
+ flex-shrink: 0;
+}
+
+.popup-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #1F2937;
+}
+
+.popup-close {
+ position: absolute;
+ right: 32rpx;
+ top: 50%;
+ transform: translateY(-50%);
+ color: #9CA3AF;
+}
+
+.popup-body {
+ flex: 1;
+ overflow-y: auto;
+ padding: 32rpx;
+}
+
+.popup-footer {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 24rpx;
+ padding: 24rpx 32rpx;
+ padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
+ border-top: 1rpx solid #F3F4F6;
+ background: #FFFFFF;
+ flex-shrink: 0;
+}
+
+.popup-cancel-btn {
+ flex: 1;
+ background: #F3F4F6;
+ color: #6B7280;
+ font-size: 30rpx;
+ font-weight: 600;
+ padding: 24rpx 0;
+ border-radius: 20rpx;
+ border: none;
+ line-height: 1.5;
+}
+
+.popup-cancel-btn::after {
+ border: none;
+}
+
+.popup-confirm-btn {
+ flex: 1;
+ background: linear-gradient(135deg, #EF4444 0%, #EF4444 100%);
+ color: #FFFFFF;
+ font-size: 30rpx;
+ font-weight: 600;
+ padding: 24rpx 0;
+ border-radius: 20rpx;
+ border: none;
+ line-height: 1.5;
+}
+
+.popup-confirm-btn::after {
+ border: none;
+}
+
+/* 取消原因 */
+.cancel-tip {
+ font-size: 28rpx;
+ color: #6B7280;
+ line-height: 1.6;
+ margin-bottom: 24rpx;
+}
+
+.cancel-reason-list {
+ display: flex;
+ flex-direction: column;
+ gap: 8rpx;
+}
+
+.cancel-reason-item {
+ display: flex;
+ align-items: center;
+ gap: 16rpx;
+ padding: 20rpx 16rpx;
+ border-radius: 12rpx;
+ transition: background 0.2s;
+}
+
+.cancel-reason-item.active {
+ background: #FEF3C7;
+}
+
+.reason-radio {
+ width: 36rpx;
+ height: 36rpx;
+ border: 3rpx solid #D1D5DB;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+ transition: border-color 0.2s;
+}
+
+.cancel-reason-item.active .reason-radio {
+ border-color: #D4A853;
+}
+
+.reason-radio-inner {
+ width: 20rpx;
+ height: 20rpx;
+ background: #D4A853;
+ border-radius: 50%;
+}
+
+.reason-text {
+ font-size: 28rpx;
+ color: #374151;
+}
diff --git a/pages/escort/recordlist.js b/pages/escort/recordlist.js
index 79cd001..b5f1245 100644
--- a/pages/escort/recordlist.js
+++ b/pages/escort/recordlist.js
@@ -2,7 +2,7 @@ const API = require('../../utils/api.js')
const STATUS_MAP = {
pending: { text: '待确认', color: '#F59E0B', bg: '#FEF3C7' },
- confirmed: { text: '已确认', color: '#3B82F6', bg: '#DBEAFE' },
+ confirmed: { text: '待就诊', color: '#3B82F6', bg: '#DBEAFE' },
in_progress: { text: '进行中', color: '#8B5CF6', bg: '#EDE9FE' },
completed: { text: '已完成', color: '#10B981', bg: '#D1FAE5' },
cancelled: { text: '已取消', color: '#6B7280', bg: '#F3F4F6' }
@@ -17,6 +17,13 @@ const TYPE_MAP = {
other: '其他'
}
+const PAYMENT_STATUS_MAP = {
+ unpaid: { text: '未支付', color: '#F59E0B', bg: '#FEF3C7' },
+ paid: { text: '已支付', color: '#3B82F6', bg: '#DBEAFE' },
+ refunding: { text: '退款中', color: '#F59E0B', bg: '#FEF3C7' },
+ refunded: { text: '已退款', color: '#6B7280', bg: '#F3F4F6' }
+}
+
Page({
data: {
records: [],
@@ -26,15 +33,17 @@ Page({
pageSize: 10,
statusFilter: '',
statusTabs: [
- { value: '', label: '全部' },
- { value: 'pending', label: '待确认' },
- { value: 'confirmed', label: '已确认' },
- { value: 'in_progress', label: '进行中' },
- { value: 'completed', label: '已完成' }
+ { value: '', label: '全部', count: 0 },
+ { value: 'pending', label: '待确认', count: 0 },
+ { value: 'confirmed', label: '已确认', count: 0 },
+ { value: 'in_progress', label: '进行中', count: 0 },
+ { value: 'completed', label: '已完成', count: 0 }
]
},
- onLoad() {
+ onLoad(options) {
+ const tab = options.tab || ''
+ this.setData({ statusFilter: tab })
this.loadRecords(true)
},
@@ -71,8 +80,9 @@ Page({
page,
pageSize: this.data.pageSize
}
+
if (this.data.statusFilter) {
- params.status = this.data.statusFilter
+ //params.status = this.data.statusFilter
}
return API.escort.getMyRecords(params)
@@ -80,10 +90,12 @@ Page({
if (res.code === 0) {
const list = res.data.records || []
const formatted = list.map(item => this.formatRecord(item))
+ this.data.statusTabs = this.computeStatusCounts(formatted, this.data.statusTabs)
this.setData({
records: reset ? formatted : this.data.records.concat(formatted),
page,
- hasMore: list.length >= this.data.pageSize
+ hasMore: list.length >= this.data.pageSize,
+ statusTabs: this.data.statusTabs
})
} else {
wx.showToast({ title: res.msg || '加载失败', icon: 'none' })
@@ -97,13 +109,29 @@ Page({
})
},
+ computeStatusCounts(records, tabs) {
+ tabs.forEach(tab => {
+ tab.count = 0
+ })
+ tabs[0].count = records.length
+ records.forEach(item => {
+ tabs.forEach(tab => {
+ if (tab.value === item.status) {
+ tab.count++
+ }
+ })
+ })
+ return tabs
+ },
+
formatRecord(item) {
- const statusInfo = STATUS_MAP[item.escort?.status] || STATUS_MAP.pending
+ const statusInfo = STATUS_MAP[item.status] || STATUS_MAP.pending
const typeText = TYPE_MAP[item.escort?.type] || '陪诊服务'
const fee = item.payment?.totalFee || 0
const appointmentTime = item.schedule?.date
? this.formatDateTime(item.schedule.date) + item.schedule.startTime
: '--'
+ const paymentStatusInfo = PAYMENT_STATUS_MAP[item.payment?.status] || PAYMENT_STATUS_MAP.unpaid
return {
_id: item._id,
@@ -112,13 +140,17 @@ Page({
hospital: item.hospital?.name || '--',
department: item.hospital?.department || '--',
typeText,
- status: item.escort?.status,
+ status: item.status,
statusText: statusInfo.text,
statusColor: statusInfo.color,
statusBg: statusInfo.bg,
appointmentTime,
fee: fee.toFixed(2),
- escortNote: item.notes?.escortNote || ''
+ patientNote: item.notes?.patientNote || '',
+ escortNote: item.notes?.escortNote || '',
+ paymentStatusText: paymentStatusInfo.text,
+ paymentStatusColor: paymentStatusInfo.color,
+ paymentStatusBg: paymentStatusInfo.bg
}
},
@@ -139,7 +171,7 @@ Page({
onTapRecord(e) {
const id = e.currentTarget.dataset.id
wx.navigateTo({
- url: `/pages/mine/escort_record_detail/escort_record_detail?id=${id}`
+ url: `/pages/escort/recorddetail?id=${id}`
})
},
diff --git a/pages/escort/recordlist.wxml b/pages/escort/recordlist.wxml
index a5a0405..b506a5f 100644
--- a/pages/escort/recordlist.wxml
+++ b/pages/escort/recordlist.wxml
@@ -8,7 +8,7 @@
data-value="{{item.value}}"
bindtap="onTabChange"
>
- {{item.label}}
+ {{item.label}}({{item.count}})
@@ -43,8 +43,20 @@
{{item.department}}
- 就诊人
- {{item.patientName}} {{item.patientMobile}}
+ 就诊人姓名
+ {{item.patientName}}
+
+
+ 电话
+ {{item.patientMobile}}
+
+
+ 就诊需求
+ {{item.patientNote}}
+
+
+ 陪诊说明
+ {{item.escortNote}}
@@ -54,8 +66,8 @@
费用:
¥{{item.fee}}
-
-
+
+ {{item.paymentStatusText}}
diff --git a/pages/escort/recordlist.wxss b/pages/escort/recordlist.wxss
index 03e631a..627a47e 100644
--- a/pages/escort/recordlist.wxss
+++ b/pages/escort/recordlist.wxss
@@ -11,7 +11,7 @@ page {
.status-tabs {
display: flex;
align-items: center;
- gap: 16rpx;
+ gap: 4rpx;
padding: 24rpx 32rpx;
background: #FFFFFF;
position: sticky;
@@ -140,10 +140,7 @@ page {
font-weight: 700;
}
-.arrow {
- display: flex;
- align-items: center;
-}
+
/* 空状态 */
.empty-state {
diff --git a/pages/home/index.js b/pages/home/index.js
index aeca8f5..5b02d50 100644
--- a/pages/home/index.js
+++ b/pages/home/index.js
@@ -1,23 +1,21 @@
Page({
data: {
escortServices: [
- { id: 1, name: '陪诊', icon: 'heart', url: '', type: '' },
- { id: 2, name: '代问诊', icon: 'chat-heart', url: '', type: '' },
- { id: 3, name: '代预约', icon: 'draft', url: '', type: '' },
- { id: 4, name: '其他助诊', icon: 'cooperate', url: '', type: '' },
+ { id: 1, name: '陪诊', icon: 'heart', iconColor: '#E11D48', bgColor: '#FFF1F2' },
+ { id: 2, name: '代问诊', icon: 'chat-heart', iconColor: '#EA580C', bgColor: '#FFF7ED' },
+ { id: 3, name: '代办理', icon: 'fact-check', iconColor: '#059669', bgColor: '#ECFDF5' },
+ { id: 8, name: '其他助诊', icon: 'app', iconColor: '#2563EB', bgColor: '#EFF6FF' }
],
otherServices: [
- { id: 1, name: '代探望', icon: 'apple', url: '', type: '' },
- { id: 2, name: '企业陪诊', icon: 'city-8', url: '', type: '' },
- { id: 3, name: '陪诊师入驻', icon: 'usergroup', url: '', type: '' },
- { id: 4, name: '商务合作', icon: 'command', url: '', type: '' },
+ { id: 1, name: '代探望', icon: 'apple', url: '', type: '', iconColor: '#7C3AED', bgColor: '#F5F3FF' },
+ { id: 2, name: '企业陪诊', icon: 'city-8', url: '', type: '', iconColor: '#D97706', bgColor: '#FFFBEB' },
+ { id: 3, name: '陪诊师入驻', icon: 'usergroup', url: '', type: '', iconColor: '#4F46E5', bgColor: '#EEF2FF' },
+ { id: 4, name: '商务合作', icon: 'command', url: '', type: '', iconColor: '#0D9488', bgColor: '#F0FDFA' },
],
tools: [
- { id: 1, name: '医院电话', icon: 'call', url: 'pages/hospital/contact', type: 'page' },
- { id: 2, name: '科室排行', icon: 'ai-coordinate-system', url: 'pages/hospital/ranking', type: 'page' },
- { id: 3, name: '医保备案', icon: 'system-code', url: '#小程序://异地备案/FfXUvTLmNptZx5E', type: 'wxapp' },
- { id: 4, name: '医疗影像', icon: 'film-1', url: '', type: '' }
- ]
+ { id: 1, name: '预约记录', icon: 'assignment', url: 'pages/escort/recordlist', type: 'page', iconColor: '#0891B2', bgColor: '#ECFEFF' },
+ { id: 2, name: '健康档案', icon: 'attach', url: '', type: '', iconColor: '#DB2777', bgColor: '#FDF2F8' }
+ ]
},
async onLoad() {
@@ -52,7 +50,7 @@ Page({
const item = e.currentTarget.dataset.item;
if (!item || !item.type || !item.url) {
wx.showToast({
- title: '建设中, 请电话联系!',
+ title: '建设中...',
icon: 'none'
});
return;
@@ -72,7 +70,7 @@ Page({
break;
default:
wx.showToast({
- title: '建设中, 请电话联系!',
+ title: '建设中...',
icon: 'none'
});
}
diff --git a/pages/home/index.wxml b/pages/home/index.wxml
index c7e1e4a..17b5f57 100644
--- a/pages/home/index.wxml
+++ b/pages/home/index.wxml
@@ -1,95 +1,110 @@
-
-
-
-
-
- 暖橙陪诊
-
-
+
+
-
-
-
-
-
- 专业陪诊
-
- 让就医更简单,让客户更安心
+
+
+
+
+ 暖橙陪诊
-
-
-
-
-
-
- 客服咨询
- AI Customer service
-
-
-
-
- 联系我们
- Contact us anytime
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 专业陪诊
+ 让就医更简单,让客户更安心
- {{ item.name }}
-
-
-
-