From cae90224a8e7fd9c41444c46067bb8f78728360b Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Mar 2025 15:11:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E7=A7=AF=E5=88=86=E4=BD=BF=E7=94=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=88=87=E6=8D=A2=E5=BC=95=E8=B5=B7=E7=9A=84=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/components/order.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/views/tool/Instead/components/order.vue b/src/views/tool/Instead/components/order.vue index 3fdb7b2..0b85735 100644 --- a/src/views/tool/Instead/components/order.vue +++ b/src/views/tool/Instead/components/order.vue @@ -378,7 +378,7 @@ async function pointsInit() { if (!props.user.id || score.sel == -1) { return; } - const orderAmount = currentpayMoney.value - pointsDiscountAmount.value; + const orderAmount = currentpayMoney.value * 1 + pointsDiscountAmount.value * 1; const res = await PointsApi.calcOrderUsablePoints({ shopUserId: props.user.id, orderAmount: orderAmount <= 0 ? 0 : orderAmount, @@ -396,7 +396,7 @@ async function pointsInit() { async function pointsToMoney() { const res = await PointsApi.calcPointsToMoney({ shopUserId: props.user.id, - orderAmount: currentpayMoney.value - pointsDiscountAmount.value, + orderAmount: currentpayMoney.value * 1 + pointsDiscountAmount.value * 1, points: usePointsNumber.value, }); pointsDiscountAmount.value = res; @@ -426,12 +426,9 @@ watch( () => score.sel, (newval) => { console.log(newval); - if (newval == -1) { - usePointsNumber.value = 0; - pointsDiscountAmount.value = 0; - } else { - pointsInit(); - } + usePointsNumber.value = 0; + pointsDiscountAmount.value = 0; + pointsInit(); } ); function canUsePayType(item) {