From b9246bc7283e41fae749c78768dd1f981160e7cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=96=B9=E6=88=90?= Date: Tue, 6 Jan 2026 02:13:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E5=B0=86=20points?= =?UTF-8?q?=5Frequired=20=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA=E4=B8=BA?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E5=B9=B6=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages-shop/shop/detail.vue | 4 ++-- pages/shop/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages-shop/shop/detail.vue b/pages-shop/shop/detail.vue index e9f3b6c..067ae43 100644 --- a/pages-shop/shop/detail.vue +++ b/pages-shop/shop/detail.vue @@ -9,7 +9,7 @@ {{ detail.title || detail.name || '-' }} - {{ (detail.points_required ? (detail.points_required / 100).toFixed(1) : '0.0') || (detail.price ? (detail.price / 100).toFixed(1) : '0.0') }} + {{ (detail.points_required ? (detail.points_required).toFixed(0) : '0') || (detail.price ? (detail.price / 100).toFixed(1) : '0.0') }} 积分 @@ -115,7 +115,7 @@ async function onRedeem() { return } - const points = (detail.value.points_required ? (detail.value.points_required / 100).toFixed(1) : '0.0') || (detail.value.price ? (detail.value.price / 100).toFixed(1) : '0.0') + const points = (detail.value.points_required ? (detail.value.points_required).toFixed(0) : '0') || (detail.value.price ? (detail.value.price / 100).toFixed(1) : '0.0') uni.showModal({ title: '确认兑换', content: `是否消耗 ${points} 积分兑换 ${p.title || p.name}?`, diff --git a/pages/shop/index.vue b/pages/shop/index.vue index 1214b93..8618642 100644 --- a/pages/shop/index.vue +++ b/pages/shop/index.vue @@ -252,7 +252,7 @@ function normalizeItems(list, kind) { image: cleanUrl(i.main_image || i.image || ''), title: i.name || i.title || '', price: i.price || i.discount_value || 0, - points: i.points_required ? (i.points_required / 100).toFixed(1) : (i.price ? (i.price / 100).toFixed(1) : (i.discount_value ? (i.discount_value / 100).toFixed(1) : '0.0')), + points: i.points_required ? (i.points_required).toFixed(0) : (i.price ? (i.price / 100).toFixed(1) : (i.discount_value ? (i.discount_value / 100).toFixed(1) : '0')), stock: i.in_stock ? 99 : 0, // Simplified stock check if returned as bool discount_value: i.discount_value || 0, min_spend: i.min_spend || 0,