feat(escort): 微信支付入口与取消状态展示

- 下单改为提交预约后弹窗选择支付方式,默认微信支付
- 预约详情支持发起微信支付、查单确认与待支付期间切换支付方式
- 预约列表展示支付渠道、待支付/超时状态并提供去支付入口
- 取消状态与 status 解耦,展示状态优先取 cancelStatus
- 详情页医院选择回传字段同步移除 manual
This commit is contained in:
lik
2026-11-05 18:55:18 +08:00
parent f70a8f8b72
commit 8eb7bc9e7a
11 changed files with 627 additions and 90 deletions
+13 -2
View File
@@ -8,8 +8,18 @@ const STATUS_MAP = {
cancelled: { text: '已取消', color: '#B4231A', bg: '#FCF0EE', border: '#F2D6D1', desc: '该订单已取消' }
}
// 取消与 status 解耦:展示层优先按 cancelStatus 映射为「待取消/已取消」,
// 其余情况仍按服务状态展示,status 本身不再写入取消值。
function resolveOrderStatus(item) {
const cancelStatus = item?.cancelStatus || 'none'
if (cancelStatus === 'cancelled') return 'cancelled'
if (cancelStatus === 'requested') return 'cancel_requested'
return item?.status || 'pending'
}
const PAYMENT_STATUS_MAP = {
unpaid: { text: '未支付', color: '#B8520A', bg: '#FFF4E8', border: '#FFE0C2', hint: '请联系客服完成支付' },
// 未支付的展示文案由页面按 payChannel / 支付窗口派生,这里不再固定「联系客服」
unpaid: { text: '未支付', color: '#B8520A', bg: '#FFF4E8', border: '#FFE0C2' },
partial: { text: '部分支付', color: '#B8520A', bg: '#FFF4E8', border: '#FFE0C2', hint: '请联系客服补齐剩余费用' },
paid: { text: '已支付', color: '#1F7A4D', bg: '#EAF6EE', border: '#CDE9D7' },
refunding: { text: '退款中', color: '#B8520A', bg: '#FFF4E8', border: '#FFE0C2', hint: '退款处理中,如需了解进度请联系客服' },
@@ -18,5 +28,6 @@ const PAYMENT_STATUS_MAP = {
module.exports = {
STATUS_MAP,
PAYMENT_STATUS_MAP
PAYMENT_STATUS_MAP,
resolveOrderStatus
}