From 22035d543ba4cb27ad889840190590a90298c5eb Mon Sep 17 00:00:00 2001 From: jacobxu666 Date: Thu, 24 Sep 2026 12:19:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9F=B3=E6=B2=B9=E5=88=B8=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BB=B7=E6=A0=BC=E4=B8=8E=E6=A0=B8=E9=94=80=E7=A0=81?= =?UTF-8?q?=E6=94=B9=E9=80=A0=E2=80=94=E2=80=94=E4=BB=B7=E6=A0=BC=E5=8F=96?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=20latest.price=20=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=EF=BC=88=E6=B5=8B=E8=AF=95=E6=9C=9F=200.01=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=AE=9E=E6=97=B6=E6=A0=B8=E9=94=80?= =?UTF-8?q?=E7=A0=81=2060=20=E7=A7=92=E8=BD=AE=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- pages/petrol/orderConfirm.vue | 16 ++++++++++++++++ pages/venue/detail.vue | 7 ++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pages/petrol/orderConfirm.vue b/pages/petrol/orderConfirm.vue index 718f3b0..7699cf7 100644 --- a/pages/petrol/orderConfirm.vue +++ b/pages/petrol/orderConfirm.vue @@ -84,8 +84,24 @@ export default { return } if (options.orderNo) this.orderNo = options.orderNo + this.initFromServer() }, methods: { + // xuchao: 价格展示以服务端 latest 为准(测试期 0.01);已有待支付单自动续用;已发券直接跳券详情 + initFromServer() { + this.$u.api.voucherLatest({ phone: this.phone }).then(res => { + if (!bizOk(res)) return + const d = bizData(res) + if (d.price) this.priceText = (d.price / 100).toFixed(2) + if (!this.orderNo && d.statusCode === 0 && d.orderNo) { + this.orderNo = d.orderNo + if (d.amount) this.priceText = (d.amount / 100).toFixed(2) + } + if (d.statusCode === 2) { + uni.redirectTo({ url: '/pages/petrol/voucherDetail?orderNo=' + (d.orderNo || '') }) + } + }).catch(() => {}) + }, onConfirmPay() { if (this.submitting) return // xuchao: 容器拦截——非云闪付且非联调白名单号,弹窗不发起支付(决策 11/13) diff --git a/pages/venue/detail.vue b/pages/venue/detail.vue index 605203e..08e9d06 100644 --- a/pages/venue/detail.vue +++ b/pages/venue/detail.vue @@ -118,10 +118,11 @@ export default { voucherBtnText() { const s = this.voucher ? this.voucher.statusCode : -1 if (s === 0) return '继续支付' - if (s === 1) return '查看我的券' - if (s === 2) return '查看我的券' + if (s === 1 || s === 2) return '查看我的券' if (s === 3 || s === 4) return '重新购买' - return '¥200 购买' + // xuchao: 购买按钮金额取服务端下发价(测试期 0.01);未登录无数据时用中性文案 + if (this.voucher && this.voucher.price) return '¥' + (this.voucher.price / 100).toFixed(2) + ' 购买' + return '购买汽油券' }, ticketInfoList() { if (!this.store || !this.store.ticketInfo) return []