fix: 应付金额动态

This commit is contained in:
whitechiina 2025-04-14 09:38:09 +08:00
parent ff7aa74ab1
commit 72443535cf
2 changed files with 8 additions and 25 deletions

View File

@ -107,7 +107,7 @@
</view> --> </view> -->
<view class="text-wrapper_4 itemamount"> <view class="text-wrapper_4 itemamount">
<text lines="1" class="text_24">实际付款</text> <text lines="1" class="text_24">实际付款</text>
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{computedTotal.real_pay_price}}</text> <text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{realPayment}}</text>
</view> </view>
<view class="text-wrapper_4 itemamount"> <view class="text-wrapper_4 itemamount">
<text lines="1" class="text_24">积分</text> <text lines="1" class="text_24">积分</text>
@ -284,7 +284,8 @@
use_broker: false, use_broker: false,
hasAssigned: false, // hasAssigned: false, //
YingPrice: 0 // YingPrice: 0 ,//
realPayment: 0, //
}; };
}, },
onLoad() { onLoad() {
@ -351,20 +352,6 @@
}; };
// //
console.log('初始化', newobj); 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; this['FormInfor']['use_coin'] = this.use_coin? 1 : 0;
@ -385,10 +372,12 @@
// 使 // 使
isCoin() { isCoin() {
this.use_coin = !this.use_coin; this.use_coin = !this.use_coin;
this.getCart();
}, },
isBroker() { isBroker() {
this.use_broker = !this.use_broker; this.use_broker = !this.use_broker;
this.getCart();
}, },
/** /**
@ -501,8 +490,7 @@
// ,() // ,()
current['newvalue'] = current['is_deduction']; current['newvalue'] = current['is_deduction'];
}, 500, true) }, 500, true)
}
},
} }
} }
</script> </script>

View File

@ -311,18 +311,13 @@ const restaurantmixins = {
// 佣金计算 // 佣金计算
computedOfflineOrder(this.FormInfor).then(res => { computedOfflineOrder(this.FormInfor).then(res => {
this.loading = false; this.loading = false;
this.computedTotal = res.data; this.realPayment = res.data.real_pay_price;
if (!res.data.used_broker) {
this.use_broker = false
};
if (!res.data.used_coin) {
this.use_coin = false
}
/* /*
* 仅赋值一次 * 仅赋值一次
*/ */
if (this.hasAssigned) return; if (this.hasAssigned) return;
this.computedTotal = res.data;
this.YingPrice = res.data.real_pay_price; this.YingPrice = res.data.real_pay_price;
this.hasAssigned = true; this.hasAssigned = true;