From 45f608c408eadfd84feed35367cac0e3d8bfb642 Mon Sep 17 00:00:00 2001 From: jacobxu666 Date: Thu, 24 Sep 2026 12:27:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B4=AD=E5=88=B8=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=8E=A2=E6=B4=BB=E6=98=BE=E9=9A=90=E2=80=94?= =?UTF-8?q?=E2=80=94=E6=8E=A5=E5=8F=A3=E6=9C=AA=E9=83=A8=E7=BD=B2=E6=9C=9F?= =?UTF-8?q?=E9=97=B4=E6=A8=A1=E5=9D=97=E8=87=AA=E5=8A=A8=E9=9A=90=E8=97=8F?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E6=AD=BB=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- pages/venue/detail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/venue/detail.vue b/pages/venue/detail.vue index 08e9d06..e058fbf 100644 --- a/pages/venue/detail.vue +++ b/pages/venue/detail.vue @@ -113,7 +113,8 @@ export default { return this.detailType !== '2' }, isPetrol() { - return this.loaded && String(this.shopId) === PETROL_SHOP_ID && !this.isVenue + // xuchao: 后端券服务探活(latest 返回 price)后才展示购券模块——后端未部署期间整模块自动隐藏,无死入口 + return this.loaded && String(this.shopId) === PETROL_SHOP_ID && !this.isVenue && !!(this.voucher && this.voucher.price) }, voucherBtnText() { const s = this.voucher ? this.voucher.statusCode : -1 @@ -170,10 +171,9 @@ export default { if (String(this.shopId) === PETROL_SHOP_ID) this.loadVoucher() }, methods: { - // xuchao: 拉取石油券最新订单状态(未登录不查,按钮保持“¥200 购买”,点击时再引导登录) + // xuchao: 拉取石油券最新订单状态(未登录也调用:作为后端服务探活,price 决定模块显隐) loadVoucher() { - const phone = uni.getStorageSync('phone') - if (!phone) { this.voucher = null; return } + const phone = uni.getStorageSync('phone') || '' this.$u.api.voucherLatest({ phone }).then(res => { this.voucher = bizOk(res) ? bizData(res) : null }).catch(() => { this.voucher = null })