From dfe65e0ae64b47a819927dffff16c278e88b932b Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 5 Nov 2024 16:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=AF=E5=88=86=E6=8A=B5?= =?UTF-8?q?=E6=89=A3=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=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/index.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index 05c187a..d519fcd 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -1407,7 +1407,7 @@ export default { minDeductionPoints: 0, maxUsablePoints: 0, usable: false, - points: 0, + value: 0, toMoney: 0, }, //选中可用优惠券 @@ -1857,7 +1857,7 @@ export default { this.createOrder.discount = 1; } }, - "vipUser.id": async function (val) { + "vipUser.id": function (val) { // if (!this.table.tableId) { // return; // } @@ -1875,6 +1875,9 @@ export default { type: val === "" ? 1 : 0, }).then((res) => { this.createOrder.data.memberId = val.id; + this.getCalcUsablePoints().then((res) => { + this.pointsValueChange(this.points.value); + }); }); }, "prveOrder.list.length": function (val) { @@ -1993,8 +1996,12 @@ export default { }, methods: { async getCalcUsablePoints() { + const memberId= this.createOrder.data.memberId || this.vipUser.id + if(!memberId){ + return + } const pointsRes = await $calcUsablePoints({ - memberId: this.createOrder.data.memberId || this.vipUser.id, + memberId:memberId, orderAmount: this.currentPayMoney.toFixed(2), }); this.points.res = pointsRes;