fix: 应付金额
This commit is contained in:
parent
02fb87bb48
commit
6b91cac242
|
|
@ -71,7 +71,7 @@
|
|||
</view> -->
|
||||
<view class="Commodity">
|
||||
<text lines="1" class="quantity">应付</text>
|
||||
<text lines="1" class="amount">¥{{ calculationamount['prices'] }}</text>
|
||||
<text lines="1" class="amount">¥{{ (calculationamount.prices).toFixed(2) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 新增计算抵扣逻辑 -->
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||
<view>
|
||||
<text lines="1" class="quantity">抵用券</text>
|
||||
<text lines="1" class="amount">(¥{{ computedTotal.coin_balance }} )</text>
|
||||
<text lines="1" class="amount">(¥{{ YingPrice }} )</text>
|
||||
</view>
|
||||
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
||||
</view>
|
||||
|
|
@ -283,6 +283,8 @@
|
|||
use_coin: false,
|
||||
use_broker: false,
|
||||
|
||||
hasAssigned: false, // 标志变量
|
||||
YingPrice: 0 // 应付
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
|
|
|||
|
|
@ -244,6 +244,8 @@
|
|||
computedTotal: {},
|
||||
use_coin: 0,
|
||||
use_broker: 0,
|
||||
hasAssigned: false, // 标志变量
|
||||
YingPrice: 0 // 应付
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
|
|
|||
|
|
@ -318,6 +318,14 @@ const restaurantmixins = {
|
|||
if (!res.data.used_coin) {
|
||||
this.use_coin = false
|
||||
}
|
||||
|
||||
/*
|
||||
* 仅赋值一次
|
||||
*/
|
||||
if (this.hasAssigned) return;
|
||||
this.YingPrice = res.data.real_pay_price;
|
||||
this.hasAssigned = true;
|
||||
|
||||
}).catch(res => {
|
||||
this.loading = false;
|
||||
uni.showToast({
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>消费补贴卡</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.e3f766fd.js></script></body></html>
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.58ad7669.js></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue