diff --git a/pages/escort/itemdetail.js b/pages/escort/itemdetail.js index c088082..14aee0a 100644 --- a/pages/escort/itemdetail.js +++ b/pages/escort/itemdetail.js @@ -35,10 +35,10 @@ Page({ gender: '不限', genderIndex: 0, genderOptions: ['不限', '男', '女'], - payChannel: 'online_wechat', + payChannel: 'offline', // 医院下拉展开时,把医院行滚到弹窗滚动容器顶部,避免列表被裁掉 popupScrollIntoView: '', - // 点击「提交预约」后弹出支付方式选择,默认微信支付 + // 点击「提交预约」后弹出支付方式选择,默认线下支付 showPayPopup: false }, @@ -308,7 +308,7 @@ Page({ return } // 保留下单弹窗在下层,取消支付时可直接返回表单,已填信息不丢失 - this.setData({ showPayPopup: true, payChannel: 'online_wechat' }) + this.setData({ showPayPopup: true, payChannel: 'offline' }) }, onClosePayPopup() { diff --git a/pages/escort/itemdetail.wxml b/pages/escort/itemdetail.wxml index 6ccd7e2..8fa9993 100644 --- a/pages/escort/itemdetail.wxml +++ b/pages/escort/itemdetail.wxml @@ -220,7 +220,7 @@ - + diff --git a/pages/escort/itemorder.js b/pages/escort/itemorder.js index 08a2848..68203ca 100644 --- a/pages/escort/itemorder.js +++ b/pages/escort/itemorder.js @@ -6,8 +6,6 @@ const { ensureLogin } = require('../../utils/auth.js') const SERVICE_OPTION_HEIGHT = 108 // 下拉面板最多占用的屏高:扣掉底部固定操作栏与页面留白,项目再多也能整屏看到 const SERVICE_PANEL_RESERVED = 200 -// 与陪诊师列表 / 详情页共用的选择结果 key -const SELECTED_ATTENDANT_KEY = 'escort_selected_attendant' // 免责协议标题兜底:接口未返回时也能在勾选行展示协议名称 const DEFAULT_DISCLAIMER_TITLE = '全程陪诊服务免责协议' @@ -43,14 +41,12 @@ Page({ remark: '', shippingAddress: '', requiresAddress: false, - payChannel: 'online_wechat', - // 点击「提交预约」后弹出支付方式选择,默认微信支付 + payChannel: 'offline', + // 点击「提交预约」后弹出支付方式选择,默认线下支付 showPayPopup: false, gender: '不限', genderIndex: 0, genderOptions: ['不限', '男', '女'], - // 用户指定陪诊师(选填);为空则由平台抢单或管理端指派 - selectedAttendant: null, // 下单前必须勾选确认《全程陪诊服务免责协议》 agreementAgreed: false, agreementHint: false, @@ -68,40 +64,10 @@ Page({ }, onShow() { - // 从陪诊师列表返回时取回用户选择 - this.consumeSelectedAttendant() // 从新增/编辑就诊人页返回时刷新档案,首次进入由 initializePage 加载。 if (this.pageReady && getApp().globalData.user?._id) this.loadProfiles() }, - consumeSelectedAttendant() { - const selected = wx.getStorageSync(SELECTED_ATTENDANT_KEY) - if (!selected) return - wx.removeStorageSync(SELECTED_ATTENDANT_KEY) - if (selected.cleared) { - this.setData({ selectedAttendant: null }) - return - } - if (!selected.id) return - this.setData({ - selectedAttendant: { - id: selected.id, - name: selected.name || '', - workYears: selected.workYears || 0, - orderCount: selected.orderCount || 0 - } - }) - wx.showToast({ title: `已选择 ${selected.name || '陪诊师'}`, icon: 'none' }) - }, - - goToAttendants() { - wx.navigateTo({ url: '/pages/escort/attendants?select=1' }) - }, - - onClearAttendant() { - this.setData({ selectedAttendant: null }) - }, - /** * 免责协议:与表单并行预加载,用户点开弹层或直接提交时都能立即展示 */ @@ -423,7 +389,7 @@ Page({ this.loadDisclaimer() return } - this.setData({ showPayPopup: true, payChannel: 'online_wechat' }) + this.setData({ showPayPopup: true, payChannel: 'offline' }) }, onClosePayPopup() { @@ -506,11 +472,7 @@ Page({ notes: { patientNote: data.remark.trim() }, payment: { payChannel: data.payChannel }, // 协议确认快照:回传用户实际阅读的协议版本,服务端与当前版本比对,不一致则拒绝 - agreement: { accepted: true, version: data.disclaimer?.version || '' }, - // 只传 employeeId,姓名 / 电话由服务端按员工档案回填 - ...(data.selectedAttendant - ? { attendant: { employeeId: data.selectedAttendant.id } } - : {}) + agreement: { accepted: true, version: data.disclaimer?.version || '' } } }, @@ -583,7 +545,6 @@ Page({ genderIndex: 0, remark: '', shippingAddress: '', - selectedAttendant: null, // 协议按单次服务确认,重置表单后需重新勾选 agreementAgreed: false, agreementHint: false, diff --git a/pages/escort/itemorder.wxml b/pages/escort/itemorder.wxml index e320e79..f571992 100644 --- a/pages/escort/itemorder.wxml +++ b/pages/escort/itemorder.wxml @@ -107,21 +107,6 @@ - - - 指定陪诊师 - - - {{selectedAttendant ? selectedAttendant.name : '平台安排(可选)'}} - - - - - - 从业 {{selectedAttendant.workYears}} 年 · 已接 {{selectedAttendant.orderCount}} 单 - 清除 - - 预约日期 @@ -191,7 +176,7 @@ - + diff --git a/pages/escort/itemorder.wxss b/pages/escort/itemorder.wxss index 3184ffa..f3c0e0a 100644 --- a/pages/escort/itemorder.wxss +++ b/pages/escort/itemorder.wxss @@ -312,28 +312,6 @@ page { transform: rotate(45deg); } -/* 已选陪诊师:展示从业与接单数,支持清除后回到平台安排 */ -.attendant-choice { - display: flex; - align-items: center; - justify-content: space-between; - gap: 16rpx; - margin: -6rpx 0 6rpx; - padding: 10rpx 0 0; -} - -.attendant-choice-text { - color: var(--muted); - font-size: var(--fs-24); -} - -.attendant-choice-clear { - flex-shrink: 0; - color: var(--brand-ink); - font-size: var(--fs-24); - font-weight: 600; -} - .order-textarea { box-sizing: border-box; width: 100%;