From 72443535cf41e69dd4a8b847dc564cfc0273e937 Mon Sep 17 00:00:00 2001 From: whitechiina <1293616053@qq.com> Date: Mon, 14 Apr 2025 09:38:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=94=E4=BB=98=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../orders-settlement/orders-settlement.vue | 24 +++++-------------- static/js/mixin/restaurantmixins.js | 9 ++----- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue index 8c50da8..5d0cfa4 100644 --- a/pages/restaurant/order/orders-settlement/orders-settlement.vue +++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue @@ -107,7 +107,7 @@ --> 实际付款: - ¥{{computedTotal.real_pay_price}} + ¥{{realPayment}} 积分: @@ -284,7 +284,8 @@ use_broker: false, hasAssigned: false, // 标志变量 - YingPrice: 0 // 应付 + YingPrice: 0 ,// 应付 + realPayment: 0, // 实际付款 }; }, onLoad() { @@ -351,20 +352,6 @@ }; // 获取余额 console.log('初始化', newobj); - - // 好像是查询补贴卡的 - // conWalletInfoAPI().then(res => { - // this['amount'] = res['data']['amount']; - // // this['amount'] = 4076; - // this['FormInfor']['brand_id'] = this['BrandInfor']['brand_id']; - // this['FormInfor']['restaurant_id'] = this['GetShopInfor']['restaurant_id']; - // this['FormInfor']['restaurant_name'] = this['GetShopInfor']['restaurant_name']; - // this['FormInfor']['lat'] = this['GetShopInfor']['latitude']; - // this['FormInfor']['lng'] = this['GetShopInfor']['longitude']; - // this['FormInfor']['restaurant_address'] = this['GetShopInfor']['restaurant_address']; - // this['FormInfor']['products'] = products; - // console.log(this['FormInfor'], 'FormInfor') - // }) // 计算点餐金额 this['FormInfor']['use_coin'] = this.use_coin? 1 : 0; @@ -385,10 +372,12 @@ // 是否使用券 isCoin() { this.use_coin = !this.use_coin; + this.getCart(); }, isBroker() { this.use_broker = !this.use_broker; + this.getCart(); }, /** @@ -501,8 +490,7 @@ // 保存当前点击商品的指定数据,用于计算金额(新值) current['newvalue'] = current['is_deduction']; }, 500, true) - - }, + } } } diff --git a/static/js/mixin/restaurantmixins.js b/static/js/mixin/restaurantmixins.js index 21adf41..bb8e276 100644 --- a/static/js/mixin/restaurantmixins.js +++ b/static/js/mixin/restaurantmixins.js @@ -311,18 +311,13 @@ const restaurantmixins = { // 佣金计算 computedOfflineOrder(this.FormInfor).then(res => { this.loading = false; - this.computedTotal = res.data; - if (!res.data.used_broker) { - this.use_broker = false - }; - if (!res.data.used_coin) { - this.use_coin = false - } + this.realPayment = res.data.real_pay_price; /* * 仅赋值一次 */ if (this.hasAssigned) return; + this.computedTotal = res.data; this.YingPrice = res.data.real_pay_price; this.hasAssigned = true;